MCPcopy Create free account
hub / github.com/0010aor/FlashNotes / ApiError

Class ApiError

frontend/src/client/core/ApiError.ts:4–21  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2import type { ApiResult } from './ApiResult'
3
4export class ApiError extends Error {
5 public readonly url: string
6 public readonly status: number
7 public readonly statusText: string
8 public readonly body: unknown
9 public readonly request: ApiRequestOptions
10
11 constructor(request: ApiRequestOptions, response: ApiResult, message: string) {
12 super(message)
13
14 this.name = 'ApiError'
15 this.url = response.url
16 this.status = response.status
17 this.statusText = response.statusText
18 this.body = response.body
19 this.request = request
20 }
21}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected