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

Raises KeyError when no "path" has been specified #88

Open
frederikaalund opened this issue Jul 16, 2018 · 0 comments
Open

Raises KeyError when no "path" has been specified #88

frederikaalund opened this issue Jul 16, 2018 · 0 comments

Comments

@frederikaalund
Copy link

The following patch

[
	{
		"op": "add"
	}
]

when applied via

modified_config_dict = jsonpatch.apply_patch(config_dict, patch)

rasies a KeyError because path is not found. I was expecting it to raise a (subclass of) jsonpatch.JsonPatchException.

Is this a bug or by design? If the latter is the case, then please reconsider this decision. I find it a lot easier to use a Python library when I know that all exceptions, that the API may raise, are a subclasses of a library-specific base exception.

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