A sails hook for errors
npm install sails-hook-errorhandler [![NPM Version][npm-image]][npm-url]
[![NPM Downloads][downloads-image]][downloads-url]
[![Build Status][build-image]][build-url]
[![bitHound Overall Score][score-image]][score-url]
[![bitHound Dependencies][dep-image]][dep-url]
[![bitHound Dev Dependencies][devdep-image]][devdep-url]
[![bitHound Code][code-image]][code-url]
[![Codacy Badge][codacy-image]][codacy-url]


[![NPM][graph-image]][graph-url]
```
npm install sails-hook-errorhandler
Define at config/seed.js
`js``
module.exports.errorhandler = {
modelCodes: {
User: "11" //some model and some code
}
}
[npm-image]: https://img.shields.io/npm/v/sails-hook-errorhandler.svg
[npm-url]: https://npmjs.org/package/sails-hook-errorhandler
[downloads-image]: https://img.shields.io/npm/dm/sails-hook-errorhandler.svg
[downloads-url]: https://npmjs.org/package/sails-hook-errorhandler
[build-image]: https://travis-ci.org/sanjorgek/sails-hook-errorhandler.svg
[build-url]: https://travis-ci.org/sanjorgek/sails-hook-errorhandler
[code-image]: https://www.bithound.io/github/sanjorgek/sails-hook-errorhandler/badges/code.svg
[code-url]: https://www.bithound.io/github/sanjorgek/sails-hook-errorhandler
[dep-image]: https://www.bithound.io/github/sanjorgek/sails-hook-errorhandler/badges/dependencies.svg
[dep-url]: https://www.bithound.io/github/sanjorgek/sails-hook-errorhandler/bithound/dependencies/npm
[devdep-image]: https://www.bithound.io/github/sanjorgek/sails-hook-errorhandler/badges/devDependencies.svg
[devdep-url]: https://www.bithound.io/github/sanjorgek/sails-hook-errorhandler/bithound/dependencies/npm
[score-image]: https://www.bithound.io/github/sanjorgek/sails-hook-errorhandler/badges/score.svg
[score-url]: https://www.bithound.io/github/sanjorgek/sails-hook-errorhandler
[issue-image]: https://codeclimate.com/github/sanjorgek/sails-hook-errorhandler/badges/issue_count.svg
[issue-url]: https://codeclimate.com/github/sanjorgek/sails-hook-errorhandler
[climate-image]: https://codeclimate.com/github/sanjorgek/sails-hook-errorhandler/badges/gpa.svg
[climate-url]: https://codeclimate.com/github/sanjorgek/sails-hook-errorhandler
[graph-image]: https://nodei.co/npm-dl/sails-hook-errorhandler.png?months=6&height=1
[graph-url]: https://nodei.co/npm/sails-hook-errorhandler/
[codacy-url]: https://www.codacy.com/app/sanjorgek/sails-hook-errorhandler?utm_source=github.com&utm_medium=referral&utm_content=sanjorgek/sails-hook-errorhandler&utm_campaign=Badge_Grade
[codacy-image]: https://api.codacy.com/project/badge/Grade/b4d2c1a2313b4948b9c6209917c61e7c