Skip to content
This repository was archived by the owner on Nov 15, 2018. It is now read-only.
This repository was archived by the owner on Nov 15, 2018. It is now read-only.

JsonPatchException: Invalid JsonPatch operation thrown on model binding  #80

@hjaltijon

Description

@hjaltijon

When the operation is invalid, an exception will be thrown on model binding.
{
"value": "someValue",
"path": "/validPath",
"op": "invalidOperationName"
}

Why is that? I would have thought that the patch document would become null, with an error message in the modelstate, just like when the json body is invalid?
I dont want to return a 500 error to the caller when the operation is invalid...

Is this the intended behavior? If so, is there a workaround?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions