Skip to content
This repository has been archived by the owner on Apr 5, 2022. It is now read-only.

Property mapping failure fails silently #6

Open
bobpardoe opened this issue Oct 14, 2016 · 0 comments
Open

Property mapping failure fails silently #6

bobpardoe opened this issue Oct 14, 2016 · 0 comments

Comments

@bobpardoe
Copy link

When PATCHing via rest and passing an invalid column name in the Json body, the save fails silently.

doMerge() in DomainObjectReader class of spring-data-rest-webmvc-2.5.2.RELEASE.jar

Has the following

 if (!mappedProperties.hasPersistentPropertyForField(fieldName)) {
                i.remove();
                continue;
}

Would it not be better for some sort of mapping exception to be raised?

Nothing is written to the console or exception raised. Just a 204 is returned (I am intentionally not returning the updated row).

This makes it impossible for the client to determine if the PATCH / PUT update was successful or not.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

1 participant