MCPcopy Create free account
hub / github.com/developmentseed/stac-react / constructor

Method constructor

src/utils/ApiError.ts:12–24  ·  view source on GitHub ↗
(message: string, status: number, detail?: GenericObject | string, url?: string)

Source from the content-addressed store, hash-verified

10 url?: string;
11
12 constructor(message: string, status: number, detail?: GenericObject | string, url?: string) {
13 super(message);
14 this.name = 'ApiError';
15 this.status = status;
16 this.detail = detail;
17 this.url = url;
18
19 // Maintains proper stack trace for where our error was thrown
20 // Note: Error.captureStackTrace is a V8-only feature (Node.js, Chrome)
21 if (Error.captureStackTrace) {
22 Error.captureStackTrace(this, ApiError);
23 }
24 }
25}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected