Closed jakobw closed 2 years ago
Merging #49 (6a9078c) into master (6d7c9d5) will not change coverage. The diff coverage is
100.00%
.:exclamation: Current head 6a9078c differs from pull request most recent head 9593b9e. Consider uploading reports for the commit 9593b9e to get more accurate results
@@ Coverage Diff @@
## master #49 +/- ##
=======================================
Coverage 96.63% 96.63%
=======================================
Files 10 10
Lines 535 535
=======================================
Hits 517 517
Misses 18 18
Impacted Files | Coverage Δ | |
---|---|---|
src/JsonPatch.php | 100.00% <100.00%> (ø) |
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more
That was quick, thanks!
Hi! :wave:
This PR adds a new exception type, which allows users of this library to distinguish between
apply()
errors due to the patch not being applicable and errors due to failed test operations.Our (@wmde's) use case is a REST API with a PATCH endpoint which should have a different response for these two types of errors. We would like to do the following (simplified):
As far as I can tell the only way to distinguish the two at the moment is by the exception message, which is a bit awkward to handle in code.