Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

487
Views
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 answers
Answer question

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 Report

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!