Skip to content

Conversation

@kieran-osgood-shopify
Copy link
Contributor

What changes are you making?


Before you merge

Important

Releasing a new version of the kit?

Releasing a new major version?

  • I have bumped the version number in the README.

Tip

See the Contributing documentation for instructions on how to publish a new version of the library.

@kieran-osgood-shopify kieran-osgood-shopify changed the title refactor: replace CheckoutErrorRequest with CheckoutErrorEvent Migrate CheckoutErrorRequest to CheckoutErrorEvent Dec 10, 2025
@kieran-osgood-shopify kieran-osgood-shopify force-pushed the prototype-development/issue-139-checkout.error branch from d962027 to a513e09 Compare December 10, 2025 11:31
/// Issued when the storefront configuration has caused an error.
/// Note that the Checkout Sheet Kit only supports stores migrated for extensibility.
case configurationError(message: String, code: CheckoutErrorCode, recoverable: Bool = false)
case misconfiguration(message: String, code: ErrorCode, recoverable: Bool = false)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Proposal: rename configuration -> misconfiguration
Felt closer aligned to the naming of "expired" and "unavailable" (the target of the noun is whats happened?)

.sdk still feels like an outlier in that sense though

Copy link
Contributor

@markmur markmur Dec 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.sdk.internal maybe?

misconfiguration looks good

///
/// Every event has a "recoverable" property that indicates this error may be recoverable when retried in a fallback browser experience
/// This may have a degraded experience, implement CheckoutDelegate.shouldRecoverFromError to opt out
public enum CheckoutError: Error {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As this error class is CheckoutError I thought it may make sense to remove the repeated/inconsistent "checkout" and "error" in the cases

Comment on lines +82 to +84
/// unavailable: recoverable:true
case killswitchEnabled = "KILLSWITCH_ENABLED"
case unrecoverableFailure = "UNRECOVERABLE_FAILURE"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

recoverable: true here seems wrong?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants