Automattic / Automattic/wp-calypso

Marketplace: Query error state handling

Open
#66,331 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
12.6k
Forks
2k
Avg merge
1d 17h
Merged PRs (30d)
538

Description

Similar to the [404 page](https://github.com/Automattic/wp-calypso/issues/61342) we also need to add, when queries receive an http error we need to handle the response with a graceful timeout and either pretend there was no result or show an error message of some kind.

At the moment we just retry the query and hope it completes leaving the user on a loading state indefinitely.

These two videos were recorded during the recent [wp.org outage](https://status.wordpress.org/2022/08/05/all-wordpress-org-services-are-currently/)

https://user-images.githubusercontent.com/811776/183328112-b3e23f85-23d9-48a0-b94d-e998dd498bc3.mp4

https://user-images.githubusercontent.com/811776/183328116-24c065e1-5064-4ef9-aaef-97d460f06ef9.mp4

Acceptance:
- [ ] Show plugin page error on query failure - this is separate from the 404. We don't want to send a 404 in case of an endpoint failure mode.
- [ ] Show error message on search results "please come back later" or pretend there are no results.
- [ ] Don't retry api endpoints on failure.
- [ ] Implement fixes on /plugins, search, individual pages, category browsing and /manage pages.

Contributor guide

Open the contributing guide

Research direction

Start by tracing query handling for /plugins, search, individual pages, category browsing, and /manage. Verify the current retry behavior and define the failure states for plugin pages and search results. Done means failures stop retrying indefinitely, show a graceful error or empty result, and do not turn endpoint failures into 404 responses.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
api, frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.