11 lines
312 B
TypeScript
11 lines
312 B
TypeScript
/** Authentication failure whose message is safe to return to clients. */
|
|
export class UnauthorizedError extends Error {
|
|
/**
|
|
* @param message - Client-safe unauthorized summary.
|
|
*/
|
|
constructor(message = 'Unauthorized') {
|
|
super(message);
|
|
this.name = 'UnauthorizedError';
|
|
}
|
|
}
|