Error Handling
Cart and checkout integrations can provide errors and warnings that give the buyer who triggered the integration the ability to resolve the problem and retry. Examples of resolvable errors include lack of inventory, pricing changes, and transient errors, such as unreachable external services.
Integration developers can catch runtime errors and communicate those errors to users via the CartValidationOutput standard object. This example code is executed in a synchronous style, indicating to the caller that the integration completed with errors. You can also execute these errors asynchronously by adding a callback mechanism.
This example code is executed in a synchronous style, indicating to the caller that the integration completed with errors. You can also execute these errors in an async style with the addition of a callback mechanism.
Errors that occur during checkout execution are presented to the buyer within the cart. They can present as a cart header, a cart item error, or a cart delivery group error.