bothy-sdk
    Preparing search index...

    Function unwrap

    • Resolves an openapi-fetch call to its data, or throws the typed ProblemError.

      Type Parameters

      Parameters

      • call: Promise<R>

        The pending call.

      • operation: string

        The name of the operation for the error message (its operationId).

      Returns Promise<SuccessData<R>>

      The data of the 2xx answer (undefined for an answer without body).

      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");