Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

489
Vistas
Error response body is empty in Spring Boot 2.6

There is an application on Spring Web stack. I faced an unusal problem after the upgrading to the lastest Spring Boot 2.6.1.

The following code

@RestController
@RequestMapping("sample")
class SampleController {
    @PostMapping
    fun doSomething(@RequestBody body: Any): Any {
        error("Error!")
    }
}

used to produce the following error in earlier versions

{
    "timestamp": "2020-05-27T13:44:58.032+00:00",
    "status": 500,
    "error": "Internal Server Error",
    "message": "Error!",
    "path": "/sample"
}

But after the upgrade the whole response body is empty. Not the message field which is could be fixed with server.error.inclide-message: always flag setting, but the whole body. The include-binding-errors: always flag has no effect as well.

I found no notes about that behavior in the Spring Boot changelog

over 4 years ago · Santiago Trujillo
2 Respuestas
Responde la pregunta

0

Have a look at this issue: https://github.com/spring-projects/spring-boot/issues/28953

If you permit access to the /error whitelabel page in your SecurityConfig it should work again. However, this seems to be a workaround as the issue is still in progress.

over 4 years ago · Santiago Trujillo Denunciar

0

So it was a bug in 2.6.0 and 2.6.1 version. Fixed in 2.6.2

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda