-
Notifications
You must be signed in to change notification settings - Fork 38.8k
Closed
Closed
Copy link
Labels
in: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)type: enhancementA general enhancementA general enhancement
Milestone
Description
Ole K Ersoy opened SPR-13100 and commented
When submitting dates that Spring does not know how to desearialize it's possible to see the exception in the REST response. For example I can do the following:
response =
given().auth()
.basic(ADMIN_USER, PASSWORD)
.contentType(APPLICATION_JSON_CONTENT_TYPE)
.body(updatedJSON)
.when()
.put(contactRestPath);
System.out.println(response.getBody().asString());
I was running the above in a test, however GSON did not serialize the date to something Spring could read, thus the corresponding controller method (Update method) was never called. It would be nice if Spring could log the exception to the console, so that what is happening is more clear.
SIDE NOTE:
GSON has been around for a while, so I assumed that it would have a serialization/desearialization strategy that fits well with most rest frameworks:
google/gson#650
Cheers,
- Ole
Affects: 4.2 RC1
Issue Links:
- Inappropriate warn logging in AbstractHandlerExceptionResolver (e.g. for 404 status) [SPR-13596] #18174 Inappropriate warn logging in AbstractHandlerExceptionResolver (e.g. for 404 status)
- Consistent warn logging without stacktrace in Portlet HandlerExceptionResolver [SPR-13611] #18189 Consistent warn logging without stacktrace in Portlet HandlerExceptionResolver
Metadata
Metadata
Assignees
Labels
in: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)type: enhancementA general enhancementA general enhancement