bothy-sdk
    Preparing search index...

    Class ProblemError

    A failed API call, decoded from its Problem body; prefer problemError to build one.

    try {
    await unwrap(api.POST("/runs/{run_id}/start", init), "startRun");
    } catch (err) {
    if (err instanceof ProblemError && err.code === "already_started") return;
    throw err;
    }

    Hierarchy (View Summary)

    Index

    Constructors

    • Creates the error.

      Parameters

      • status: number

        The HTTP status.

      • code: string

        The problem code.

      • details: ProblemDetails = {}

        The other members of the problem.

      Returns ProblemError

    Properties

    code: string

    The stable machine code as sent; may be a code this SDK does not know.

    correlationId: string | undefined

    The correlation ID for support.

    current: Readonly<Record<string, unknown>> | undefined

    The current resource of a conflict, as a raw object.

    detail: string | undefined

    The detail text; never part of the error message.

    errors: readonly {}[]

    Field errors of 400 validation_failed.

    instance: string | undefined

    The instance URI.

    operation: string | undefined

    The operation that failed.

    reason: string | undefined

    The finer reason, for example expired.

    retryAfterMs: number | undefined

    The wait of Retry-After in milliseconds.

    status: number

    The HTTP status (0 for a gateway error frame of an unknown code).

    title: string

    The short title.

    Methods

    • Returns the members that are safe to log (no detail, no title, no current document).

      Returns Record<string, unknown>

      The name, status, code, reason, correlation ID and operation.