Automattic / Automattic/jetpack

Simple payments block: add generic error handling

Open Beginner friendly
#11,879 0 comments 0 reactions 0 assignees View on GitHub
[Block] Pay With Paypal [Feature] Pay with PayPal [Focus] Blocks [Pri] Normal Enhancement
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.