UNPKG

libmodulor

Version:

A TypeScript library to create platform-agnostic applications

10 lines (9 loc) 311 B
import { CustomError } from './CustomError.js'; export class UnauthorizedError extends CustomError { httpStatus = 401; constructor(message) { super(message ?? 'err_unauthorized'); this.name = 'UnauthorizedError'; Object.setPrototypeOf(this, UnauthorizedError.prototype); } }