Edit Page

views/500.ejs

This is the default "500: Server Error" page. User agents that don't "Accept" HTML will see a JSON version instead.

You can customize the control logic for your needs in config/500.js Sails considers a request in a "500: Server Error" state when your app throws a catchable error (not inside of an asynchronous callback).

You can also trigger this response from one of your controllers or policies with: return res.serverError( e ); (where e is an optional message, error, or array of errors to include in the response).

Want to see for yourself?

An example of this file can be found in our sample app repo, here.

Anatomy of a Sails App