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

If a REST client call fails, the status code is forwarded to the client #31326

Closed
lorenzobenvenuti opened this issue Feb 21, 2023 · 4 comments
Closed
Labels
area/rest-client kind/bug Something isn't working triage/out-of-date This issue/PR is no longer valid or relevant

Comments

@lorenzobenvenuti
Copy link

Describe the bug

Hi,

if a REST calls fails while serving a request, the application forwards the status code to the client (and nothing is logged on the server). Since the underlying error is caused by an unhandled exception on the server, I was expecting a 500.

It looks like the same issue was addressed in this PR, I'm wondering if there was a regression.

Thanks,

lorenzo

Expected behavior

The server returns a 500

Actual behavior

The server returns the status code of the response that caused the REST call to fail.

How to Reproduce?

GreetingResourceTest#helloEndpointReturnsA500WhenTheRestClientCallFails test in https://github.com/lorenzobenvenuti/rest-client-exception-bug

Output of uname -a or ver

No response

Output of java -version

No response

GraalVM version (if different from Java)

No response

Quarkus version or git rev

2.16.3

Build tool (ie. output of mvnw --version or gradlew --version)

No response

Additional information

No response

@lorenzobenvenuti lorenzobenvenuti added the kind/bug Something isn't working label Feb 21, 2023
@quarkus-bot
Copy link

quarkus-bot bot commented Feb 21, 2023

/cc @Sgitario (rest-client), @cescoffier (rest-client), @geoand (rest-client)

@geoand
Copy link
Contributor

geoand commented Feb 22, 2023

Actually, this has been fixed in the Reactive REST Client.

If you substitute quarkus-rest-client-jackson with quarkus-rest-client-reactive-jackson, everything works as expected

@geoand geoand closed this as completed Feb 22, 2023
@geoand geoand added the triage/out-of-date This issue/PR is no longer valid or relevant label Feb 22, 2023
@lorenzobenvenuti
Copy link
Author

TYVM!

@geoand
Copy link
Contributor

geoand commented Feb 22, 2023

🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/rest-client kind/bug Something isn't working triage/out-of-date This issue/PR is no longer valid or relevant
Projects
None yet
Development

No branches or pull requests

2 participants