Skip to contents

Shows a short message when a wrapped output fails. On the first load, the panel fills the space of the output. After a good load, it becomes a banner above the old content. Messages from validate() pass through. Messages from shiny::safeError() show in the panel even when detail is FALSE, including when shiny.sanitize.errors = TRUE.

Usage

bones_error(message = NULL, detail = FALSE)

Arguments

message

A single string. NULL uses "This content could not be loaded.".

detail

Show the error message below the main message. The default is FALSE. Use TRUE only for development: when shiny.sanitize.errors = FALSE, raw errors can contain file paths, SQL, or private data.

Value

An htmltools::tag with role="alert".

Examples

bones_error()
#> <div class="bones-error" role="alert">
#>   <div class="bones-error-message">This content could not be loaded.</div>
#>   <div class="bones-error-safe"></div>
#> </div>
bones_error("The chart could not be loaded.")
#> <div class="bones-error" role="alert">
#>   <div class="bones-error-message">The chart could not be loaded.</div>
#>   <div class="bones-error-safe"></div>
#> </div>