export class UnauthorizedError extends Error { status: number constructor(message?: string) { super() this.message = message ? `Unauthorized: ${message}` : `Unauthorized.` this.status = 401 } }