Skip to main content
Version tags should be used for questions that apply to a version only, not to merely say what version a site is using.
Source Link
leymannx
  • 18.8k
  • 6
  • 72
  • 126

How tocan I return a templated response from an Exception Event subscriber?

I'm currently using an Event Subscriber to catch exceptions and return a plain-text message response to the user (instead of the default white screen of death).

Is there a way to return a templated response (using the site's theme, similar to a Controller's response) from the event subscriber in Drupal 9/10?

Thanks!

How to return a templated response from an Exception Event subscriber?

I'm currently using an Event Subscriber to catch exceptions and return a plain-text message response to the user (instead of the default white screen of death).

Is there a way to return a templated response (using the site's theme, similar to a Controller's response) from the event subscriber in Drupal 9/10?

Thanks!

How can I return a templated response from an Exception Event subscriber?

I'm currently using an Event Subscriber to catch exceptions and return a plain-text message response to the user (instead of the default white screen of death).

Is there a way to return a templated response (using the site's theme, similar to a Controller's response) from the event subscriber in Drupal 9/10?

Source Link

How to return a templated response from an Exception Event subscriber?

I'm currently using an Event Subscriber to catch exceptions and return a plain-text message response to the user (instead of the default white screen of death).

Is there a way to return a templated response (using the site's theme, similar to a Controller's response) from the event subscriber in Drupal 9/10?

Thanks!