Skip to content

Add specific errors to differentiate them#69

Merged
mehwoot merged 2 commits intomasterfrom
errors
Feb 8, 2022
Merged

Add specific errors to differentiate them#69
mehwoot merged 2 commits intomasterfrom
errors

Conversation

@mehwoot
Copy link
Contributor

@mehwoot mehwoot commented Feb 8, 2022

Currently any error parsed from XPM is an instance of the base class XpmRuby::Error, which means you can't specifically rescue these errors separately to other errors. This is a problem if say, you want to catch error in validating data from XPM but not catch other things like TokenExpired (because it's handled elsewhere).

This change adds two new error classes to differentiate these errors. They still inherit from the same parent as before so it should be a non breaking change. I bumped the version too because I guess technically that's what we should do.

@mehwoot mehwoot requested a review from abreckner February 8, 2022 01:36
@mehwoot mehwoot requested a review from a team as a code owner February 8, 2022 01:36
Copy link

@jcdeniz jcdeniz left a comment

Choose a reason for hiding this comment

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

👍

@mehwoot mehwoot merged commit 457aaa9 into master Feb 8, 2022
@mehwoot mehwoot deleted the errors branch February 8, 2022 03:36
lankz pushed a commit that referenced this pull request Jun 10, 2025
* Specific error types for differentiation

* Update version number
lankz pushed a commit that referenced this pull request Jun 10, 2025
* Specific error types for differentiation

* Update version number
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.

3 participants