Resolves an openapi-fetch call to its data, or throws the typed ProblemError.
data
The pending call.
The name of the operation for the error message (its operationId).
operationId
The data of the 2xx answer (undefined for an answer without body).
2xx
undefined
ProblemError for a non-2xx answer, TransportError or TimeoutError when no answer arrived.
const run = await unwrap(api.GET("/runs/{run_id}", { params: { path: { run_id } } }), "getRun"); Copy
const run = await unwrap(api.GET("/runs/{run_id}", { params: { path: { run_id } } }), "getRun");
Resolves an openapi-fetch call to its
data, or throws the typed ProblemError.