UNPKG

libmodulor

Version:

A TypeScript library to create platform-agnostic applications

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