eko-moleculer-errors
v0.1.0
Published
Add error types for moleculer projects
Downloads
3
Readme
- Moleculer errors
These errors are useful for moleculer projects as they extend the original moleculer error type in more descriptive ways.
** Usage
~npm i --save eko-moleculer-errors~
#+BEGIN_SRC javascript const { NotFound } = require('eko-moleculer-errors')
throw new NotFound() // Not Found! #+END_SRC
#+BEGIN_SRC javascript const errors = require('eko-moleculer-errors')
throw new errors.NotFound() // Not Found! #+END_SRC
** Error types
- Teapot
- NoToken
- NotFound
- BaseError
- Forbidden
- BadRequest
- UnAuthorized