MCPcopy Create free account
hub / github.com/analogdotnow/Analog / makeMessage

Method makeMessage

packages/microsoft-calendar/src/error.ts:27–50  ·  view source on GitHub ↗
(
    status: number | undefined,
    error: any,
    message: string | undefined,
  )

Source from the content-addressed store, hash-verified

25 date?: string;
26 "request-id"?: string;
27 innerError?: ODataInnerError;
28 [key: string]: unknown;
29}
30
31export class APIError<
32 TStatus extends number | undefined = number | undefined,
33 THeaders extends Headers | undefined = Headers | undefined,
34 TError extends ODataError | undefined = ODataError | undefined,
35> extends Error {
36 /** HTTP status for the response that caused the error */
37 readonly status: TStatus;
38 /** HTTP headers for the response that caused the error */
39 readonly headers: THeaders;
40 /** JSON body of the response that caused the error */
41 readonly error: TError;
42
43 constructor(
44 status: TStatus,
45 error: TError,
46 message: string | undefined,
47 headers: THeaders,
48 ) {
49 super(`${APIError.makeMessage(status, error, message)}`);
50 this.status = status;
51 this.headers = headers;
52 this.error = error;
53 }

Callers 1

constructorMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected