Comments (4)
Just so I understand, I should catch the HttpMessageNotReadableException possibly thrown by the converter, log it and then propagate it up? Would that be a Bad Request or an Internal Server Error in your opinion (I'm thinking the former)?
from spring-data-rest.
Yes indeed. In my opinion it would be a Bad Request.
from spring-data-rest.
I'm actually not sure grabbing an exception will fix this. Are you seeing that properties don't get updated in your Entity because they are misspelled in the incoming JSON? I added a try/catch around that call but I'm not confident that's really a fix. I haven't checked anything in yet because I'm not sure that's where I want to leave it.
I've been working with JSON Schema a little lately, and it seems like supporting a Schema would be a good long-term solution to ensuring incoming data passes muster before attempting a save. That will need to be raised in a separate issue, though, as that would be a cool new feature that needs it's own tracking.
from spring-data-rest.
Yes JSON Schema would be a good way to go.
from spring-data-rest.
Related Issues (20)
- Error "Couldn't find PersistentEntity for type class" when attempting to return Non-PersistenceEntity data HOT 1
- Augmenting arrays during merge patch only appends one element
- Nested arrays of entities need to get PUT semantics applied for merge patch
- Move off Expression infrastructure to apply JSON Patch paths
- Does spring data rest supports sorting on inherited fields? HOT 1
- Issue with Enum datatype in querydsl HOT 3
- Document how to use TestRestTemplate with spring-data-rest
- Release 4.1.10 (2023.0.10)
- Release 4.2.4 (2023.1.4)
- Release 4.3 M2 (2024.0.0)
- Json object not gettting captured in POST request HOT 4
- Upgrade to Spring Security 6.1.7 for integration tests
- Release 4.1.11 (2023.0.11)
- Release 4.2.5 (2023.1.5)
- Release 4.3 RC1 (2024.0.0)
- Upgrade to MongoDB driver 5
- Upgrade to Hibernate 6.5.0.CR1
- Release 4.1.12 (2023.0.12)
- Release 4.2.6 (2023.1.6)
- Release 4.3 GA (2024.0.0)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spring-data-rest.