Automattic / Automattic/jetpack
Simple payments block: add generic error handling
- Dominant language
- PHP
- Stars
- 1.8k
- Forks
- 898
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 774
Description
If Simple payments API returns 404, 500 or something else non-field-specific, we should show Gutenberg [``](https://github.com/WordPress/gutenberg/blob/80f625ce117ecba62b4733582e81c863a03d4ebb/packages/components/src/notice/README.md) somewhere in the block.
Currently, we handle only field-specific errors coming back from the API.
https://github.com/Automattic/wp-calypso/blob/05b68d89cc618b9e7d053bc1d1160bb3f718e23c/client/gutenberg/extensions/simple-payments/edit.js#L174-L192
Related https://github.com/Automattic/wp-calypso/issues/28634
Contributor guide
Research direction
Start in client/gutenberg/extensions/simple-payments/edit.js around lines 174-192, then read the linked Gutenberg Notice documentation. Trace how field-specific API errors are handled and identify where non-field-specific responses such as 404 or 500 should surface. Done means the block displays a Notice for generic API errors without disrupting existing field-specific handling.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 65/100