2

So I have some exceptions being caught in a plugin, and have to assume that in some cases a 500 error is going to occur at some point.

How can we set up Craft so that a server error displays a template rather than the default message display (assuming devMode is OFF)?

This would be something we'd want working across the whole site, not just on one plugin.

1 Answer 1

2

If you put a 500.html template in your craft/templates folder, then that will get displayed on the front end when a exception bubbles all the way to the top. The same will work for other HTTP status codes as well (404.html, 503.html, etc.).

2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.