MCPcopy Create free account
hub / github.com/Noumena-Network/code / axiosError

Function axiosError

src/services/oauth/client.test.ts:189–207  ·  view source on GitHub ↗
(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[]> = []

Callers 1

client.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected