Sails.js adding error domains

265 Views Asked by At

This is basically a follow up question to an earlier question (found here).

We set up our error handling based off of the response files found in api/responses/. This seems to work for almost all cases, but there does seem to be errors that can happen that do not get to the responses, and crash Sails. After looking around we found a spot in the Sails code (v0.10.0-rc6) with a comment:

// TODO: Add support for error domains..?

This commend is found in sails/lib/hooks/http/initialize.js in sails.on(), this is where Sails binds routes to the internal Express router.

If we wanted to add error domains code, is this a good spot?

0

There are 0 best solutions below