Skip to content

RPP / Failures / Catch exceptions and generate erroneous states #7425

Open

Description

Description

The current payment process throws exceptions upon all sorts of failure, and has a single block to catch all of them.

The new payment process should handle exceptions at a more granular level, and switch to a failure state immediately.

Acceptance criteria

  • Generic exceptions (Exception, Order_Not_Found, etc.) are handled within the payment processing service, rather than within a state, entering SystemErrorState.
  • Specific exceptions (ex. those around requests) should be handled immediately.
  • The error states should contain the needed functionality to log the errors, and mark the order as failed if needed.

Testing instructions

All thrown exceptions should be caught.

Dev notes

For now, we can focus only on the exceptions we are already aware of through Psalm.

Additional context

Epic: #6673
Project: paJDYF-9hL-p2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

category: coreWC Payments core related issues, where it’s obvious.category: engineeringFor product engineering, architecture work, tech debt and so on.category: projectsFor any issues which are part of any project, including bugs, enhancements, etc.component: checkoutIssues related to Checkoutfocus: checkout paymentsstatus: blockedThe issue is blocked from progressing, waiting for another piece of work to be done.status: has prThe issue has a PR.status: on holdThe issue is currently not prioritized.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions