UNPKG

@capimjs/library-auth

Version:

Professional API using Clean Architecture and TDD. to group validators

1 lines 777 B
"use strict";Object.defineProperty(exports,"__esModule",{value:true});function _export(target,all){for(var name in all)Object.defineProperty(target,name,{enumerable:true,get:all[name]})}_export(exports,{ServerError:()=>ServerError,UnauthorizedError:()=>UnauthorizedError,ForbiddenError:()=>ForbiddenError,NotFoundError:()=>NotFoundError});class ServerError extends Error{constructor(error){super("Server failed. Try again soon");this.name="ServerError";this.stack=error?.stack}}class UnauthorizedError extends Error{constructor(){super("Unauthorized");this.name="UnauthorizedError"}}class ForbiddenError extends Error{constructor(){super("Access denied");this.name="ForbiddenError"}}class NotFoundError extends Error{constructor(){super("Not found");this.name="NotFoundError"}}