Affects: 2.6.1

I'm using starter-webflux, and when invalid json is sent to my service I get a super generic error:

{
  "timestamp": "2022-01-05T20:33:32.425+00:00",
  "path": "/pets",
  "status": 400,
  "error": "Bad Request",
  "message": "Failed to read HTTP message",
}

notes: - spring-boot-devtools is active - traces in responses is turned off - I would like to avoid all the package - info leaving my API

If I include a stacktrace in my response I see that this is a org.springframework.core.codec.DecodingException. It seems like when webflux is used the message of this exception is not being mapped to the error response from spring.

Is this something that I can fix in my app? Or is this something that is could be improved in springboot?


I've done some additional reading, and it seems like this still open ticket is very similar: https://github.com/spring-projects/spring-boot/issues/18815

Comment From: snicoll

It is, closing as a duplicate.

Comment From: ahatzz11

@snicoll any ideas on a resolution? I was able to do what was needed through @ControllerAdvice but something built into the framework would be sweet.

Comment From: snicoll

@ahatzz11 this issue is closed as duplicated, and the linked issue is open for resolution so please subscribe to that issue.