cludden / sails-must

MIT License
8 stars 1 forks source link

Allow factories to determine the appropriate failing response #1

Closed cludden closed 9 years ago

cludden commented 9 years ago

currently defaults to res.forbidden, which assumes the user is using sails

// lib/must.js#148
return res.forbidden(self.message || 'Unauthorized');

we should allow the factory itself to determine the appropriate error response, or implement some sort of hook that the factories can tap into to set the appropriate error response handler

cludden commented 9 years ago

2 provides this functionality