Files
WRNexusJS/packages/security/src/errors.ts
T
2026-08-01 10:04:42 +05:30

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;
}
}