@posit-dev/shinyreact
    Preparing search index...

    Function useShinyOutputError

    • Hook to subscribe to the error of a Shiny output.

      Returns the server's (already sanitized) error, or null when the output is not in the "error" state. message is the condition/exception text — the same text vanilla Shiny paints into the output element — unless the app has shiny.sanitize.errors / sanitize_errors on, in which case the server sends its generic message instead. call and type are R-only extras; Python sends null for both.

      Silent errors (req(), and validate() with no message) never reach this hook: the server sends them with an empty message, which shinyreact treats as a null value rather than an error.

      Parameters

      • outputId: string

        The ID of the Shiny output to subscribe to.

      • options: { namespace?: string | null } = {}

        Optional configuration object.

        • Optionalnamespace?: string | null

          Module namespace to apply (or null to suppress the surrounding ShinyModuleProvider namespace).

      Returns ErrorsMessageValue | null

      The current output error, or null.