0
v-firecrawl/apps/api/src/lib/custom-error.ts

22 lines
462 B
TypeScript
Raw Normal View History

2024-04-15 17:01:47 -04:00
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);
}
}