Improve errors reporting

This commit is contained in:
2023-12-12 01:32:18 +01:00
parent 2a52b5c035
commit bc15846b67
8 changed files with 68 additions and 16 deletions

View File

@ -17,7 +17,7 @@ interface APIResponse {
export class ApiError extends Error {
constructor(message: string, public code: number, public data: any) {
super(message);
super(`HTTP status: ${code}\nMessage: ${message}\nData=${data}`);
}
}