|
1 | | -# error |
2 | | -Error wrapper based on Boom library to handle and add data in payload response |
| 1 | +<img src="http://bit.ly/2mxmKKI" width="500" alt="Hapiness" /> |
| 2 | + |
| 3 | +<div style="margin-bottom:20px;"> |
| 4 | +<div style="line-height:60px"> |
| 5 | + <a href="https://travis-ci.org/hapinessjs/error.svg?branch=master"> |
| 6 | + <img src="https://travis-ci.org/hapinessjs/error.svg?branch=master" alt="build" /> |
| 7 | + </a> |
| 8 | + <a href="https://coveralls.io/github/hapinessjs/error?branch=master"> |
| 9 | + <img src="https://coveralls.io/repos/github/hapinessjs/error/badge.svg?branch=master" alt="coveralls" /> |
| 10 | + </a> |
| 11 | + <a href="https://david-dm.org/hapinessjs/error"> |
| 12 | + <img src="https://david-dm.org/hapinessjs/error.svg" alt="dependencies" /> |
| 13 | + </a> |
| 14 | + <a href="https://david-dm.org/hapinessjs/error?type=dev"> |
| 15 | + <img src="https://david-dm.org/hapinessjs/error/dev-status.svg" alt="devDependencies" /> |
| 16 | + </a> |
| 17 | +</div> |
| 18 | +<div> |
| 19 | + <a href="https://www.typescriptlang.org/docs/tutorial.html"> |
| 20 | + <img src="https://cdn-images-1.medium.com/max/800/1*8lKzkDJVWuVbqumysxMRYw.png" |
| 21 | + align="right" alt="Typescript logo" width="50" height="50" style="border:none;" /> |
| 22 | + </a> |
| 23 | + <a href="http://reactivex.io/rxjs"> |
| 24 | + <img src="http://reactivex.io/assets/Rx_Logo_S.png" |
| 25 | + align="right" alt="ReactiveX logo" width="50" height="50" style="border:none;" /> |
| 26 | + </a> |
| 27 | + <a href="http://hapijs.com"> |
| 28 | + <img src="http://bit.ly/2lYPYPw" |
| 29 | + align="right" alt="Hapijs logo" width="75" style="border:none;" /> |
| 30 | + </a> |
| 31 | +</div> |
| 32 | +</div> |
| 33 | + |
| 34 | +# Hapiness Error |
| 35 | + |
| 36 | +Error module based on [boom](https://github.com/hapijs/boom). |
| 37 | + |
| 38 | +## Table of contents |
| 39 | + |
| 40 | +* [Using error module](#using-config-module) |
| 41 | + * [Yarn or NPM it in your package.json](#yarn-or-npm-it-in-your-packagejson) |
| 42 | + * [Use](#use) |
| 43 | +* [Change History](#change-history) |
| 44 | +* [Maintainers](#maintainers) |
| 45 | +* [License](#license) |
| 46 | + |
| 47 | +## Using config module |
| 48 | + |
| 49 | +### `yarn` or `npm` it in your `package.json` |
| 50 | + |
| 51 | +```bash |
| 52 | +$ npm install --save @hapiness/biim |
| 53 | + |
| 54 | +or |
| 55 | + |
| 56 | +$ yarn add @hapiness/biim |
| 57 | +``` |
| 58 | + |
| 59 | +```javascript |
| 60 | +"dependencies": { |
| 61 | + "@hapiness/core": "^1.0.0-rc.6", |
| 62 | + "@hapiness/biim": "^1.0.0-rc.6", |
| 63 | + //... |
| 64 | +} |
| 65 | +//... |
| 66 | +``` |
| 67 | + |
| 68 | +### Use |
| 69 | + |
| 70 | +`Node.js Script`: |
| 71 | + |
| 72 | +```javascript |
| 73 | +import { Biim } from '@hapiness/biim'; |
| 74 | + |
| 75 | +Biim.badRequest('my-message', 'some-data', { key: 'bad-request' }); |
| 76 | +``` |
| 77 | + |
| 78 | +[Back to top](#table-of-contents) |
| 79 | + |
| 80 | +## Change History |
| 81 | + |
| 82 | +* v1.0.0-rc.6 (2017-07-16) |
| 83 | + * Init the project |
| 84 | + |
| 85 | +[Back to top](#table-of-contents) |
| 86 | + |
| 87 | +## Maintainers |
| 88 | + |
| 89 | +<table> |
| 90 | + <tr> |
| 91 | + <td colspan="4" align="center"><a href="https://www.tadaweb.com"><img src="https://tadaweb.com/images/tadaweb/logo.png" width="117" alt="tadaweb" /></a></td> |
| 92 | + </tr> |
| 93 | + <tr> |
| 94 | + <td align="center"><a href="https://github.com/Juneil"><img src="https://avatars3.githubusercontent.com/u/6546204?v=3&s=117" width="117"/></a></td> |
| 95 | + <td align="center"><a href="https://github.com/antoinegomez"><img src="https://avatars3.githubusercontent.com/u/997028?v=3&s=117" width="117"/></a></td> |
| 96 | + <td align="center"><a href="https://github.com/reptilbud"><img src="https://avatars3.githubusercontent.com/u/6841511?v=3&s=117" width="117"/></a></td> |
| 97 | + <td align="center"><a href="https://github.com/njl07"><img src="https://avatars3.githubusercontent.com/u/1673977?v=3&s=117" width="117"/></a></td> |
| 98 | + </tr> |
| 99 | + <tr> |
| 100 | + <td align="center"><a href="https://github.com/Juneil">Julien Fauville</a></td> |
| 101 | + <td align="center"><a href="https://github.com/antoinegomez">Antoine Gomez</a></td> |
| 102 | + <td align="center"><a href="https://github.com/reptilbud">Sébastien Ritz</a></td> |
| 103 | + <td align="center"><a href="https://github.com/njl07">Nicolas Jessel</a></td> |
| 104 | + </tr> |
| 105 | +</table> |
| 106 | + |
| 107 | +[Back to top](#table-of-contents) |
| 108 | + |
| 109 | +## License |
| 110 | + |
| 111 | +Copyright (c) 2017 **Hapiness** Licensed under the [MIT license](https://github.com/hapinessjs/error/blob/master/LICENSE.md). |
| 112 | + |
| 113 | +[Back to top](#table-of-contents) |
0 commit comments