Function
axiosError
(params: {
code?: string
message?: string
status?: number
})
Source from the content-addressed store, hash-verified
| 187 | }) |
| 188 | |
| 189 | function axiosError(params: { |
| 190 | code?: string |
| 191 | message?: string |
| 192 | status?: number |
| 193 | }): unknown { |
| 194 | return Object.assign( |
| 195 | new Error(params.message ?? params.code ?? `status ${params.status}`), |
| 196 | { |
| 197 | isAxiosError: true, |
| 198 | code: params.code, |
| 199 | response: |
| 200 | params.status === undefined |
| 201 | ? undefined |
| 202 | : { |
| 203 | status: params.status, |
| 204 | }, |
| 205 | }, |
| 206 | ) |
| 207 | } |
| 208 | |
| 209 | it('retries transient timeout errors and preserves the registration payload', async () => { |
| 210 | const postCalls: Array<unknown[]> = [] |
Tested by
no test coverage detected