You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As mentioned in #49 we (@wmde) are using json-diff in the context of a PATCH endpoint in our REST API. We realized that some changes to the exceptions thrown by JsonPatch would allow us to provide more helpful error responses to our users.
The concrete improvements we're thinking of are:
More exception types for different types of errors (similar to Throw different exception for failed test op #49), e.g. some sort of MissingFieldException and InvalidOperationException thrown by JsonPatch::import() to tell the two error cases apart
Include details about the error in the exception if possible. For most (all?) error cases would be the failed operation (related to Enhancement: Include failed operation in Exception #45), but potentially also additional information, e.g. the actual value that caused a test operation to fail.
If this generally sound useful, we'd be happy to submit a PR.
The text was updated successfully, but these errors were encountered:
Hi! 👋
As mentioned in #49 we (@wmde) are using
json-diff
in the context of a PATCH endpoint in our REST API. We realized that some changes to the exceptions thrown byJsonPatch
would allow us to provide more helpful error responses to our users.The concrete improvements we're thinking of are:
MissingFieldException
andInvalidOperationException
thrown byJsonPatch::import()
to tell the two error cases apartIf this generally sound useful, we'd be happy to submit a PR.
The text was updated successfully, but these errors were encountered: