sergehuber opened a new pull request, #777:
URL: https://github.com/apache/unomi/pull/777

   ## Summary
   - Harden `ItemDeserializer` to reject non-object or incomplete Item JSON 
(`itemType` / `itemId` required) with `JsonMappingException` instead of 
`ClassCastException` / NPE.
   - Map wrapped JSON deserialization failures in `RuntimeExceptionMapper` to 
HTTP **400** (`badRequest` JSON), completing the UNOMI-928 error-handling work 
for malformed REST payloads.
   - Add `ItemDeserializerTest` coverage including registered type mappings.
   
   ## JIRA
   - [UNOMI-952](https://issues.apache.org/jira/browse/UNOMI-952) (primary)
   - Related: UNOMI-933, UNOMI-945, UNOMI-928
   
   ## Test plan
   - [x] `mvn -pl persistence-spi test -Dtest=ItemDeserializerTest`
   - [x] `mvn -pl rest test -Dtest=RestExceptionMapperTest,LogSanitizerTest`
   - [ ] Manual: POST context/event payload with malformed `source`/`target` 
Item (e.g. `{}`, string) → HTTP 400 JSON `{"errorMessage":"badRequest"}`


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to