diff --git a/news/index.html b/news/index.html index 33f0c9c5..434a1583 100644 --- a/news/index.html +++ b/news/index.html @@ -56,6 +56,7 @@

#956, allowing a port to be specified as an environment variable. User-provided ports must be between 1024 and 49151 (following IANA guidelines) and may not be a known unsafe port. plumber will now throw an error if an invalid port is requested. (@shikokuchuo @gadenbuie #963)

  • Added support for graphic devices provided by ragg and svglite (@thomasp85 #964)

  • parse_rds(), parse_feather(), and parse_parquet() no longer writes data to disk during parsing (@thomasp85, #942)

  • +
  • Returning error messages are now turned off by default rather than being turned on if running interactively and turned off if not (@thomasp85, #962)

  • plumber 1.2.2

    CRAN release: 2024-03-25

    diff --git a/pkgdown.yml b/pkgdown.yml index de53ae12..30735597 100644 --- a/pkgdown.yml +++ b/pkgdown.yml @@ -13,7 +13,7 @@ articles: routing-and-input: routing-and-input.html security: security.html tips-and-tricks: tips-and-tricks.html -last_built: 2025-01-23T14:56Z +last_built: 2025-01-27T20:41Z urls: reference: https://www.rplumber.io/reference article: https://www.rplumber.io/articles diff --git a/reference/Plumber.html b/reference/Plumber.html index c64de27b..4b309c9f 100644 --- a/reference/Plumber.html +++ b/reference/Plumber.html @@ -222,7 +222,7 @@

    Argumentsinteractive() at $run() time. See $setDebug() for more details.

    +

    If TRUE, it will provide more insight into your API errors. Using this value will only last for the duration of the run. If a $setDebug() has not been called, debug will default to FALSE at $run() time. See $setDebug() for more details.

    swaggerCallback
    @@ -753,7 +753,7 @@

    Method setDebug()Set debug value to include error messages.

    See also: $getDebug() and pr_set_debug()

    Usage

    -

    Plumber$setDebug(debug = interactive())

    +

    Plumber$setDebug(debug = FALSE)

    @@ -767,7 +767,7 @@

    Arguments

    Method getDebug()

    -

    Retrieve the debug value. If it has never been set, the result of interactive() will be used.

    +

    Retrieve the debug value. If it has never been set, it will return FALSE.

    See also: $getDebug() and pr_set_debug()

    Usage

    Plumber$getDebug()

    diff --git a/reference/endpoint_serializer.html b/reference/endpoint_serializer.html index b5e23700..7f24c98f 100644 --- a/reference/endpoint_serializer.html +++ b/reference/endpoint_serializer.html @@ -155,7 +155,7 @@

    Examples#> } #> }) #> } -#> <bytecode: 0x55905e439d38> +#> <bytecode: 0x55e8dfd46d98> #> <environment: namespace:plumber>

    diff --git a/reference/pr_set_debug.html b/reference/pr_set_debug.html index 9567c84a..d9966053 100644 --- a/reference/pr_set_debug.html +++ b/reference/pr_set_debug.html @@ -1,7 +1,7 @@ -Set debug value to include error messages of routes cause an error — pr_set_debug • plumber +Set debug value to include error messages of routes cause an error — pr_set_debug • plumber Skip to content @@ -55,13 +55,13 @@

    -

    To hide any error messages in production, set the debug value to FALSE. -The debug value is enabled by default for interactive() sessions.

    +

    By default, error messages from your plumber routes are hidden, but can be +turned on by setting the debug value to TRUE using this setter.

    Usage

    -
    pr_set_debug(pr, debug = interactive())
    +
    pr_set_debug(pr, debug = FALSE)
    @@ -96,6 +96,19 @@

    Examples pr_get("/boom", function() stop("boom")) %>% pr_run() } # } + +# Setting within a plumber file +#* @plumber +function(pr) { + pr %>% + pr_set_debug(TRUE) +} +#> function (pr) +#> { +#> pr %>% pr_set_debug(TRUE) +#> } +#> <environment: 0x55e8e2d7cea8> +