Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enh: Change the default value of debug to a FALSE-like sentinel value #962

Open
4 tasks
schloerke opened this issue Oct 22, 2024 · 0 comments
Open
4 tasks
Labels
help wanted Solution is well-specified enough that any community member could fix

Comments

@schloerke
Copy link
Collaborator

schloerke commented Oct 22, 2024

There are multiple reports of confusion around debug and the default error handler.

  • Errors are displayed locally when interactive()
  • Errors are not displayed when deployed

Default debug value:

plumber/R/plumber.R

Lines 1338 to 1340 in 7f51e24

default_debug <- function() {
interactive()
}

Proposal

Change the default value of debug to behave like a FALSE value.

To maintain least surprise (default to same locally, display a message with instructions on how to turn in on:

Error reporting has been turned off by default. See `pr_set_debug` for more details. 
To disable this message, setting a debug value.

Tasks

  • Change the default value of debug to behave like a FALSE value.
  • Add rlang::inform(.frequency="once", .frequency_id="pr_set_debug_message") message.
    • This should only be displayed if rlang::is_interactive() is TRUE.
  • Add #* @plumber example within pr_set_debug() docs to show to to set the value within a plumbed file
  • News entry of changed behavior
@schloerke schloerke added the help wanted Solution is well-specified enough that any community member could fix label Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Solution is well-specified enough that any community member could fix
Projects
None yet
Development

No branches or pull requests

1 participant