1.2.0 • Published 7 years ago
global-exceptions-npm v1.2.0
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 :
1) NotFoundException 404 2) UnauthorizedException 401 3) BadRequestException 400 4) MethodNotAllowedException 405 5) InternalServerErrorException 500
example :
throw new NotFoundException("user not found" , 404);