mirror of
https://github.com/detleph/server.git
synced 2026-09-04 00:26:03 +02:00
14 lines
364 B
TypeScript
14 lines
364 B
TypeScript
import ForwardableError from "./ForwardableError";
|
|
|
|
export default class AuthError extends ForwardableError {
|
|
protected __oid = "AUTH_ERROR";
|
|
|
|
constructor(message?: string) {
|
|
super(403, message ?? "The request did not provide sufficient authentication");
|
|
}
|
|
|
|
static isAuthError(err: any): err is AuthError {
|
|
return err.__oid === "AUTH_ERROR";
|
|
}
|
|
}
|