Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement: throw dedicated exception for a test operation failure #200

Open
turing85 opened this issue Jan 11, 2025 · 1 comment · May be fixed by #201
Open

Enhancement: throw dedicated exception for a test operation failure #200

turing85 opened this issue Jan 11, 2025 · 1 comment · May be fixed by #201

Comments

@turing85
Copy link

turing85 commented Jan 11, 2025

Currently, when a test operation fails, a JsonPatchApplicationException is thrown. This makes it hard to distinguish an input error (e.g. referencing a nonexisting path) from a failed test (it is possible by parsing the message, but a separation by exception types would be easier). The new exception type could be a subtype of JsonPatchApplicationException.

Story:
AS a developer
WHEN a test operation fails
THEN I want to receive a dedicated exception signaling that the test path has not the excpected value so I can distinguish between a syntactical error (like a wrong path) and a failed expectation.

@turing85
Copy link
Author

turing85 commented Jan 11, 2025

I have taken a look at all depentent repositories (github.com) with 100+ stars (and activity in the last 5 years). None of them should be affected when we create a new exception that inherits from JsonPatchApplicationException.

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 a pull request may close this issue.

1 participant