Edit Page

views/404.ejs

This is the default "404: Not Found" 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/404.js.

Sails considers a request to be in a "404: Not Found" state when a user requests a URL which doesn't match any of your app's routes or blueprints. You can also trigger this response from one of your controllers or policies with: return res.notFound();

Want to see for yourself?

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

Anatomy of a Sails App