exceptions: Jackson 3 unchecked JacksonException hierarchy, Spring Boot 4.2 error handling, OpenRewrite and sed migration

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017ic4b4HkWoC7hLzk61vZa8
This commit is contained in:
Claude
2026-12-03 23:41:56 +05:30
parent 26f64bc184
commit f97ec4e014
71 changed files with 2210 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
jackson-databind 3.1.8, spring-boot 4.2.0
== client sends broken JSON
> POST /orders {"id": 1, "quantity": }
< 400 {"timestamp":"...","status":400,"error":"Bad Request","path":"/orders"}
log: WARN .w.s.m.s.DefaultHandlerExceptionResolver : Resolved [org.springframework.http.converter.HttpMessageNotReadableException: JSON parse error: Unexpected character ('}' (code 125)): expected a value]
== client sends a wrong type
> POST /orders {"id":1,"quantity":1,"lines":[{"sku":"A","qty":"two"}]}
< 400 {"timestamp":"...","status":400,"error":"Bad Request","path":"/orders"}
log: WARN .w.s.m.s.DefaultHandlerExceptionResolver : Resolved [org.springframework.http.converter.HttpMessageNotReadableException: JSON parse error: Cannot deserialize value of type `int` from String "two": not a valid `int` value]
== stored data is corrupt (server problem)
> GET /orders/stored
< 500 {"timestamp":"...","status":500,"error":"Internal Server Error","path":"/orders/stored"}
log: ERROR o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed: tools.jackson.core.exc.UnexpectedEndOfInputException: Unexpected end-of-input within/between Object entries
== response cannot be serialised (server problem)
> GET /orders/unwritable
< 500 {"timestamp":"...","status":500,"error":"Internal Server Error","path":"/orders/unwritable"}
log: WARN .w.s.m.s.DefaultHandlerExceptionResolver : Resolved [org.springframework.http.converter.HttpMessageNotWritableException: Could not write JSON: lazy collection not initialised]