MCPcopy Create free account
hub / github.com/TestSprite/testsprite-cli / constructor

Method constructor

src/lib/errors.ts:144–153  ·  view source on GitHub ↗
(envelope: ErrorEnvelopeBody, httpStatus?: number, retryAfterMs?: number)

Source from the content-addressed store, hash-verified

142 readonly retryAfterMs: number | undefined;
143
144 constructor(envelope: ErrorEnvelopeBody, httpStatus?: number, retryAfterMs?: number) {
145 super(envelope.message, exitCodeFor(envelope.code));
146 this.name = 'ApiError';
147 this.code = envelope.code;
148 this.requestId = envelope.requestId;
149 this.nextAction = envelope.nextAction;
150 this.details = envelope.details;
151 this.httpStatus = httpStatus;
152 this.retryAfterMs = retryAfterMs;
153 }
154
155 /**
156 * @param apiUrl Optional API endpoint the failing request targeted. Used to

Callers

nothing calls this directly

Calls 1

exitCodeForFunction · 0.85

Tested by

no test coverage detected