The AxiosError type for operation Op, with its response.data typed to the union of JSON bodies declared for all error responses (4xx / 5xx / default). Falls back to AxiosError<unknown> for operations that declare no JSON error body.
AxiosError
Op
response.data
default
AxiosError<unknown>
// Assuming operations.createVessel has a 422 response with JSON body:type E = ApiErrorOf<operations, 'createVessel'>// → AxiosError<{ code?: string; message?: string }> Copy
// Assuming operations.createVessel has a 422 response with JSON body:type E = ApiErrorOf<operations, 'createVessel'>// → AxiosError<{ code?: string; message?: string }>
The
AxiosErrortype for operationOp, with itsresponse.datatyped to the union of JSON bodies declared for all error responses (4xx / 5xx /default). Falls back toAxiosError<unknown>for operations that declare no JSON error body.