@mtsmachado8/errors

0.0.4 • Public • Published

Errors

Módulo usado para Erros da Api

Usage CJS

const AuthenticationFailed = require('@mtsmachado8/errors/authentication-failed-401');
throw new AuthenticationFailed();

this will throw a 401 error with a default message or

const AuthenticationFailed = require('@mtsmachado8/errors/authentication-failed-401');
throw new AuthenticationFailed('My custom AuthenticationFailed message');

Usage ESM

import AuthenticationFailed from '@mtsmachado8/errors/authentication-failed-401';
throw new AuthenticationFailed();

this will throw a 401 error with a default message or

import AuthenticationFailed from '@mtsmachado8/errors/authentication-failed-401';
throw new AuthenticationFailed('My custom AuthenticationFailed message');

Readme

Keywords

none

Package Sidebar

Install

npm i @mtsmachado8/errors

Weekly Downloads

0

Version

0.0.4

License

ISC

Unpacked Size

8.25 kB

Total Files

18

Last publish

Collaborators

  • mtsmachado8