Anchorage API reference
    Preparing search index...

    Class DoStatusErrorAbstract

    The base for a DO's OWN refusal — the taxonomy's extension point, for the statuses the runtime errors do not cover. A shell declares one (ThreadIdentityError's 403) and so does a host route:

    class UnknownSignalError extends DoStatusError {
    readonly status = 404;
    }

    A CLASS, so opting in is instanceof — deliberate and nominal, the posture AuditLogger takes. The structural alternative (any thrown value with a numeric status) cannot tell a refusal this DO authored from the arbitrary values its routes throw: an upstream client's {status: 429} would become this API's 429, and {status: 0} — routine on HTTP-client error objects — would make new Response raise inside the very catch whose job is to never throw. Everything unrecognized stays a 500.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    Constructors

    • Parameters

      • Optionalmessage: string

      Returns DoStatusError

    • Parameters

      • Optionalmessage: string
      • Optionaloptions: ErrorOptions

      Returns DoStatusError

    Properties

    An optional machine-readable reason, rendered into the response body alongside the message. DECLARED HERE rather than sniffed structurally at the mapper so the channel is part of the contract a subclass opts into, and so the mapper needs no import of any subclass to render it (see the header for why that import must not exist).

    status: number

    The response status. 4xx/5xx only — see doErrorResponse.