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

JSON error is a list of character vectors #1001

Merged
merged 1 commit into from
Sep 26, 2023
Merged

JSON error is a list of character vectors #1001

merged 1 commit into from
Sep 26, 2023

Conversation

hadley
Copy link
Member

@hadley hadley commented Sep 26, 2023

Fixes #997

@@ -150,7 +150,7 @@ handleResponse <- function(response, error_call = caller_env()) {
if (response$status %in% 200:399) {
out <- json
} else if (!is.null(json$error)) {
reportError(json$error)
reportError(unlist(json$error))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From Connect, the json$error field is a simple string.

{
  "code": 123,
  "error": "something happened"
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have also confirmed that shinyapps.io errors have a simple string for json$string.

@hadley hadley merged commit 41907af into main Sep 26, 2023
10 checks passed
@hadley hadley deleted the json-error branch September 26, 2023 13:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

configureApp fails with error in rlang::abort()
2 participants