iya-sts
    Preparing search index...

    Class export=

    Draws and sends the shared error page (#1326): the error, the background collapsed, a start-over note with a link to the portal, and the diagnostics with the audit row's incident ID, all in the page's language.

    A static utility class; it holds no state.

    Index
    FOOTER_CSS: string = FOOTER_CSS

    The ending's CSS, for a page that borrows only footer().

    • The language chooser for an error page.

      Parameters

      • t: WebTranslator

        the page's translator

      • req: any

        the request the page answers

      Returns string

      the chooser's HTML

    • The whole document.

      Parameters

      • spec: ErrorPageSpec

        what to draw

      • incident: number

        the incident ID, or 0 for none

      • now: Date

        the time to print

      Returns string

      the HTML document

    • The ending every error page shares: the start-over note, the link to the realm's user portal, and the diagnostics with the time and the incident ID first.

      Parameters

      • t: WebTranslator

        the page's translator

      • diagnostics: DiagnosticRow[]

        the caller's rows

      • incident: number

        the incident ID, or 0 for none

      • now: Date

        the time to print

      Returns string

      the HTML

    • The language chooser's return path for an error page: the request itself where asking again is harmless (a GET, which these pages answer only ever by refusing again), the realm's front door otherwise.

      Parameters

      • req: any

        the request the page answers

      Returns string

      a local path

    • Reserves the incident ID, draws the page and sends it — in that order and in one synchronous run, which audit.reserveIncident() requires.

      Parameters

      • res: any

        the response

      • spec: ErrorPageSpec

        what to draw

      Returns void

    • The first of candidates the page's catalogs hold, drawn with params (#1327). A family's sentence is looked up BY ERROR CODE — a key test E cannot see in the source, since it is built from the code — so every caller hands a chain that ends in a general sentence, and a missing key never draws its own name.

      Parameters

      • t: WebTranslator

        the page's translator

      • candidates: string[]

        keys, most specific first; '' entries are skipped

      • Optionalparams: Record<string, unknown>

        the values a sentence may name

      Returns string

      the sentence as HTML, or '' where none of them exists