quarkus: Eclipse MicroProfile RestClient always returns Unknown error.
Describe the bug Calling a restAPI endpoint, using RestClient. The error message generated by the endpoint is not returned in the API exception.
Using postman, this is original response error:
{
"error": "unsupported_grant_type",
"error_description": "The authorization grant type is not supported by the authorization server. Configured grant types: [refresh_token, password, authorization_code, implicit]."
}
Expected behavior The expectation is that any service called will return the error message generated by the endpoint, and not an unknown error.
Actual behavior
the original error message is being ignored, and returns an unknown error.
WebApplicationException: Unknown error, status code 400
To Reproduce any application you use Eclipse MicroProfile RestClient will have this problem.
Environment:
- Output of
java 11: - Quarkus version
1.4.2: - Build tool
mvn 3.6:
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 24 (9 by maintainers)
@deepfunction I had the same issue. The response for 4xx codes were arriving with empty payload to my fallback handler after update quarkus from 1.7.3.Final to 2.1.2.Final
I tried adding an exception mapper and the response arrives as expected there.
I can’t reproducer the problem.
By executing
I get: