| 48 | * times out. `message` is always a human-readable string. |
| 49 | */ |
| 50 | export class ApiError extends Error { |
| 51 | constructor( |
| 52 | message: string, |
| 53 | public readonly status?: number, |
| 54 | public readonly isTimeout = false, |
| 55 | ) { |
| 56 | super(message); |
| 57 | this.name = 'ApiError'; |
| 58 | } |
| 59 | } |
| 60 | |
| 61 | /** |
| 62 | * Typed API client. Instantiate once (or use the singleton `apiClient`) |
nothing calls this directly
no outgoing calls
no test coverage detected