DataBufferLimitException in WebFlux controllers should result in 413 instead of 500 #32113
Labels
in: web
Issues in web modules (web, webmvc, webflux, websocket)
status: superseded
An issue that has been superseded by another
type: enhancement
A general enhancement
When using Spring WebFlux, there is a maximum limit on the payload size, defined by
spring.codec.max-in-memory-size
(default value is 256KB). If a request is made with a body exceeding this size,DataBufferLimitException
is thrown. The default error handler then returns a500 Internal Server Error
response. This is actually not a server side error, but instead a server side validation. This should result in413 Content Too Large
instead.Spring Boot version: 3.2.1
The text was updated successfully, but these errors were encountered: