Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

problem-spring-webflux issue with invalid request body after upgrading to Spring Boot 3 (BAD REQUEST) #940

Open
muhammad-hamed opened this issue Oct 18, 2023 · 1 comment
Labels

Comments

@muhammad-hamed
Copy link

muhammad-hamed commented Oct 18, 2023

Description

After upgrading to Spring Boot 3.1.4, there's a bug related to missing information from the request body. Here's a project debug-zalando-problem-spring-boot-3. The project has a test case that succeeds with the Spring-boot 2.7.14 while it fails with Spring Boot 3.

Expected Behavior

When we send a request body with a missing field we expect that the problem detail contains value failed for JSON property property_name due to missing

Actual Behavior

The problem detail being returned is 400 BAD_REQUEST "Failed to read HTTP message" it does not contain the relevant information about the issue with the request body.

Possible Fix

Steps to Reproduce

  1. debug-zalando-problem-spring-boot-3 contains a unit test for reproducing.
  2. The unit test is working fine with problem-spring-webflux and version: 0.27.0 and Spring Boot version 2.7.16`

Context

A generic error message will be returned by The affected service.
e.g. if customer context was missing from the request body, the returned problem detail will be 400 BAD_REQUEST "Failed to read HTTP message". The expected response problem details should have failed for JSON property customer_context due to missing. So in case there are any kind of issues related to the request body, it will be hard to figure out the reason (Specifically in case of incidents).

Your Environment

@muhammad-hamed muhammad-hamed changed the title problem-spring-webflux issue with invalid request body after upgrading to Spring Boot 3 (HTTP 400) problem-spring-webflux issue with invalid request body after upgrading to Spring Boot 3 (BAD REQUEST) Oct 18, 2023
@sivagnanavelu
Copy link

sivagnanavelu commented Apr 3, 2024

I am also facing the same issue. It is resolved?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants