global-exceptions-npm
v1.2.0
Published
Exceptions module
Readme
This model deals Exceptions
Install
npm i global-exceptions-npm
in Listeners/http.js add on Http.onStart : const Exceptions = use('global-exceptions-npm');
How to use :
- NotFoundException 404
- UnauthorizedException 401
- BadRequestException 400
- MethodNotAllowedException 405
- InternalServerErrorException 500
example :
throw new NotFoundException("user not found" , 404);
