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

More detailed JsonPatchApplicationException #111

Open
kringol opened this issue Nov 12, 2019 · 0 comments
Open

More detailed JsonPatchApplicationException #111

kringol opened this issue Nov 12, 2019 · 0 comments

Comments

@kringol
Copy link

kringol commented Nov 12, 2019

Expected Behavior

On version 0.4.7 the exception message was something like "[ADD Operation] parent is not a container in source, path provided : //num/- | node : 100"
And there was no other way to extract actionable info from the exception

Actual Behavior

On version 0.4.9 the exception message became (for example): "Cannot reference past scalar value"
An Operation and JsonPointer fields were added to the exception, but they are not public, therefore not usable by clients.
There is a toString that looks similar to the previous message, but doesn't seem to be used

Having to use the message is a bad idea anyway. So if possible having some accessible fields on the exception that would describe more details about the operation failure, etc would be greatly welcomed

Steps to Reproduce the Problem

patch("[{\"op\": \"add\", \"path\": \"/num/-\", \"value\": 100}]", "{\"num\":100}")

Specifications

Library Version:
0.4.9

Language (e.g. Java 1.8, Scala, etc):
Java 8

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

No branches or pull requests

1 participant