We are calling from our spring boot application a rest api using the WebClient
. The rest api server logs error information in the response status reason phrase e.g.:
502 Internal Server Error (LogId=123456)
We would like to access and process the log id. But it seems there is no way to get the actual response phrase from the ClientResponse
provided by the Webclient
api. The ClientResponse#statusCode
returns the status code but the response phrase is in the HttpStatus
is static.
Is there any way to access the actual response phrase from the Webclient
?