12 lines
297 B
TypeScript
12 lines
297 B
TypeScript
export class SecurityError extends Error {
|
|
readonly code: string;
|
|
readonly status: number;
|
|
|
|
constructor(code: string, message: string, status = 400, options?: ErrorOptions) {
|
|
super(message, options);
|
|
this.name = "SecurityError";
|
|
this.code = code;
|
|
this.status = status;
|
|
}
|
|
}
|