UNPKG

@gfticket/common

Version:

An auth package to make micro-service authentication easy to integrate for other services

16 lines (15 loc) 528 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.NotAuthorizedError = void 0; const custom_error_1 = require("./custom-error"); class NotAuthorizedError extends custom_error_1.CustomError { constructor() { super("You are not authorized"); this.statusCode = 401; Object.setPrototypeOf(this, NotAuthorizedError.prototype); } serializeErrors() { return [{ message: "You are not authorized" }]; } } exports.NotAuthorizedError = NotAuthorizedError;