Spaces:
Sleeping
Sleeping
Download src/utils/errors.ts from Anoderb/Tokiva-backend-Node: direct link, hf CLI and curl.
- Browser
- Download file 288 Bytes
-
https://huggingface.co/spaces/Anoderb/Tokiva-backend-Node/resolve/main/src/utils/errors.ts
- Command line
-
hf download hf://spaces/Anoderb/Tokiva-backend-Node/src/utils/errors.ts
-
curl -L -o errors.ts https://huggingface.co/spaces/Anoderb/Tokiva-backend-Node/resolve/main/src/utils/errors.ts
288 Bytes
| export class APIError extends Error { | |
| statusCode: number; | |
| errors: any; | |
| constructor(message: string, statusCode = 500, errors: any = null) { | |
| super(message); | |
| this.statusCode = statusCode; | |
| this.errors = errors; | |
| Object.setPrototypeOf(this, new.target.prototype); | |
| } | |
| } | |