Open schrek1 opened 5 years ago
@graemerocher I am thinking of attempting this. Do you think this should be done for both declarative and non-declarative client?
If yes, I was thinking of accepting request URI as a constructor argument in HttpClientResponseException
class and then in getMessage
method, prepend the exception message with request URI. If it is not added in HttpClientResponseException, it cannot be enforced.
Does this approach seem right?
So I wonder where this ends. This issue is about the request URI but maybe somebody else needs the whole request? If the response exception is going to be modified to take the request URI we may as well allow access to the entire original request
We solved finally by HttpClientFilter, which can handle incoming request and process delivered response.
@graemerocher sounds right.
Raising a PR by passing request
to HttpClientResponseException
and printing request's path
for now.
Hello there it isn't possible obtain called url from declarative client when some error occurred. It throws exception, but requested url is not contained in the throwed exception. I think it can be good feature for better tracing.