MCPcopy Create free account
hub / github.com/Openpanel-dev/openpanel / constructor

Method constructor

apps/api/src/utils/errors.ts:22–38  ·  view source on GitHub ↗
(
    message: string,
    options?: {
      status?: number;
      fingerprint?: string;
      extra?: Record<string, unknown>;
      error?: Error | unknown;
    }
  )

Source from the content-addressed store, hash-verified

20 public readonly extra?: Record<string, unknown>;
21 public readonly error?: Error | unknown;
22 constructor(
23 message: string,
24 options?: {
25 status?: number;
26 fingerprint?: string;
27 extra?: Record<string, unknown>;
28 error?: Error | unknown;
29 }
30 ) {
31 super(message);
32 this.name = 'HttpError';
33 this.status = options?.status ?? 500;
34 this.fingerprint = options?.fingerprint;
35 this.extra = options?.extra;
36 this.error = options?.error;
37 Object.setPrototypeOf(this, new.target.prototype);
38 }
39}
40
41export interface NormalizedError {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected