0.1.0 • Published 5 years ago

eko-moleculer-errors v0.1.0

Weekly downloads
-
License
MIT
Repository
-
Last release
5 years ago
  • 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