r4ds / shinyslack

Integrate Slack and Shiny
Other
15 stars 3 forks source link

Add error handling for bad code #32

Open jonthegeek opened 1 year ago

jonthegeek commented 1 year ago

When we call slackteams::add_team_code(), we should capture any errors, and display a more specific error message (rather than letting the shiny app crash). The error in the log is:

Error in slackteams::add_team_code: Failed to validate code. Slack returned: invalid_code

To the user, that shows up as:

An error has occurred!
An error has occurred. Check your logs or contact the app author for clarification.
jonthegeek commented 1 year ago

Probably include a button that removes the code from the url and reloads (ie, takes them to the app itself, to login or whatever). This probably only happens when someone is manually testing, though, so I don't know how important that is.