0
v-firecrawl/apps/api/src/lib/custom-error.ts
2024-04-15 17:01:47 -04:00

22 lines
462 B
TypeScript

export class CustomError extends Error {
statusCode: number;
status: string;
message: string;
dataIngestionJob: any;
constructor(
statusCode: number,
status: string,
message: string = "",
dataIngestionJob?: any,
) {
super(message);
this.statusCode = statusCode;
this.status = status;
this.message = message;
this.dataIngestionJob = dataIngestionJob;
Object.setPrototypeOf(this, CustomError.prototype);
}
}