bothy-sdk
    Preparing search index...

    Function unwrapDetailed

    • Resolves an openapi-fetch call to its data and the response, or throws the typed ProblemError of a failed answer.

      Use it where a header of the answer matters (Idempotent-Replay, Cache-Control, ETag).

      Type Parameters

      Parameters

      • call: Promise<R>

        The pending call, for example api.GET("/runs/{run_id}", init).

      • operation: string

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

      Returns Promise<Unwrapped<SuccessData<R>>>

      The data of the 2xx answer and the response.

      ProblemError (the subclass follows code and status) for a non-2xx answer, TransportError or TimeoutError when no answer arrived.