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

Give more verbose debug information in connection with "not a valid JSON response" #21133

Open
tobifjellner opened this issue Mar 25, 2020 · 0 comments
Labels
[Package] API fetch /packages/api-fetch [Type] Enhancement A suggestion for improvement.

Comments

@tobifjellner
Copy link
Contributor

Is your feature request related to a problem? Please describe.
A lot of users get frustrated when they get the message "XXXX failed. Error message: The response is not a valid JSON response."

You can see it for yourselves if you search in the support forums, core trac and even Gutenberg issues.

The underlying problem can be a lot of different things: a plugin conflict, an overloaded server, misconfigured http/https address in General Settings, etc.

Even for support volunteers this error message is a tough one. We may try and ask the user to enable wp_debug() and look for information there; we may ask them to glean into the console of their browser if we're lucky and they use a browser with developer tools. Or we may just ask them to disable all plugins and troubleshoot for conflicts...

It would be great if this message could offer a bit more detailed debugging information. Like:

  • Which http status code was received
  • How many bytes long was the server reply
  • An escaped print of the first 200 (arbitrary number) bytes received

... I think you get the idea.
Technically savvy users would immediately know what to look for.
Less experienced users would be able to get much better answers in the forum when they start troubleshooting.

I don't know how tricky this would be. I don't know what of this can be easily done in a secure manner, but I do know that this would make life easier for a lot of people when they're really stressed-out.

Thanks for all your good work!

@talldan talldan added [Package] API fetch /packages/api-fetch [Type] Enhancement A suggestion for improvement. labels Mar 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] API fetch /packages/api-fetch [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

2 participants