(envelope: ErrorEnvelopeBody, httpStatus?: number, retryAfterMs?: number)
| 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 |
nothing calls this directly
no test coverage detected