@suluk/hono - v0.1.5
    Preparing search index...

    Class SulukHttpError

    A typed, throwable HTTP error. tag selects the status + title from the frozen core tables; the instance renders to a Problem Details body via toProblem. Throw one from a handler; onError() maps it.

    Hierarchy

    • Error
      • SulukHttpError
    Index

    Constructors

    Properties

    tag: ErrorTag
    instance?: string
    errors?: Record<string, unknown>
    problemType?: string
    retryAfterMs?: number
    logContext?: unknown
    detail?: string

    the human detail (distinct from Error.message, which mirrors it for stack-trace readability).

    cause?: unknown
    name: string
    message: string
    stack?: string

    Accessors

    • get status(): ProblemStatus

      the HTTP status this error renders as (the frozen core mapping).

      Returns ProblemStatus

    • get retryAfterSeconds(): number | undefined

      seconds for the Retry-After header (RateLimitedError only) — ceil(retryAfterMs/1000), else undefined.

      Returns number | undefined

    Methods