| 2 | * Custom error class for API-related errors with HTTP status codes |
| 3 | */ |
| 4 | export class ApiError extends Error { |
| 5 | constructor( |
| 6 | message: string, |
| 7 | public readonly status: number, |
| 8 | public readonly statusText?: string |
| 9 | ) { |
| 10 | super(message); |
| 11 | this.name = 'ApiError'; |
| 12 | } |
| 13 | } |
nothing calls this directly
no outgoing calls
no test coverage detected