This would be somewhat similar to http://mcavage.me/node-restify/#Error-handling