WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 6 years ago

#20605 closed enhancement (fixed)

Be more friendly when API requests fail

Reported by: nacin Owned by: ryan
Milestone: 3.4 Priority: high
Severity: normal Version:
Component: UI Keywords: ux-feedback has-patch
Focuses: Cc:

Description

When plugins_api() fails, you see "An unknown error occurred during the API request." if the response was invalid, and "An Unexpected HTTP Error occurred during the API request." if the HTTP request failed.

That is not helpful. We should improve this string to let people know that it is likely a temporary issue with WordPress.org, and that if they are still seeing problems, they check the support forums.

If the HTTP request fails, it probably is not an issue with WordPress.org, so we should just point them to the support forums.

Same goes for themes_api(), I imagine.

Attachments (3)

20605.diff (2.6 KB) - added by ryan 6 years ago.
20605.2.diff (3.0 KB) - added by ryan 6 years ago.
20605.2.alt.diff (3.0 KB) - added by SergeyBiryukov 6 years ago.

Download all attachments as: .zip

Change History (9)

#1 follow-up: @markjaquith
6 years ago

  • Keywords needs-patch added

So, "invalid response" => Temporary issue with WP.org and "HTTP fail" => local problem, point to support forums?

#2 @mbijon
6 years ago

  • Cc mike@… added
  • Keywords ux-feedback added

For a system like WordPress that has many non-dev end users, I think it's worth writing longer messages that have a plain-language explanation.

Suggestions for both: "An unknown error occurred during the API request. Something may be wrong with WordPress.org"

"An Unexpected HTTP Error occurred during the API request. Something may be wrong with this network connection or server configuration."

#3 @pavelevap
6 years ago

  • Cc pavelevap@… added

We had some users which reported following error (for plugin install screen) during last several hours, but I am not sure if it is related:

Warning: number_format() expects parameter 1 to be double, string given in .../wp-includes/functions.php on line 155

Now, everything is OK.

#4 in reply to: ↑ 1 @nacin
6 years ago

Replying to markjaquith:

So, "invalid response" => Temporary issue with WP.org and "HTTP fail" => local problem, point to support forums?

Yeah, pretty much. Invalid response means the HTTP request went through, but when unserialized, the data didn't come back as expected. Note that even a WP.org issue of 500, 404, etc. could cause this. Of course, if api.wordpress.org times out, then it is possible for the HTTP failure to occur.

So, "Invalid response" => Issue with WP.org, but possibly a local problem, point to forums, "HTTP fail" => Local problem, but possibly an issue with WP.org, point to forums.

Either way, the user is actually able to understand what went wrong, and they are pointed to the best forum (heh) to address it.

@ryan
6 years ago

@ryan
6 years ago

#5 @SergeyBiryukov
6 years ago

  • Keywords has-patch added; needs-patch removed

Was going to tweak the patch so that it would be easier to distinguish the most likely cause on the support forums.

On a second thought, 20605.2.diff looks good. Separate strings are not that necessary.

#6 @ryan
6 years ago

  • Owner set to ryan
  • Resolution set to fixed
  • Status changed from new to closed

In [20752]:

Friendlier strings with links to the support forums when experiencing problems talking to api.wordpress.org. fixes #20605

Note: See TracTickets for help on using tickets.