MCPcopy Create free account
hub / github.com/boringstack-xyz/boringstack / constructor

Method constructor

apps/ui/src/lib/api/ApiError.ts:10–18  ·  view source on GitHub ↗
(status: number, body: IApiErrorBody)

Source from the content-addressed store, hash-verified

8 public readonly requestId: string | undefined;
9
10 public constructor(status: number, body: IApiErrorBody) {
11 super(body.message);
12 this.name = "ApiError";
13 this.status = status;
14 this.code = body.code;
15 this.fieldErrors = body.fieldErrors;
16 this.details = body.details;
17 this.requestId = body.requestId;
18 }
19
20 public get isUnauthorized(): boolean {
21 return this.status === 401;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected