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

Enhance ExternalHttpException to provide information from content. #247

Open
cnrudd opened this issue Jun 2, 2022 · 2 comments
Open

Enhance ExternalHttpException to provide information from content. #247

cnrudd opened this issue Jun 2, 2022 · 2 comments

Comments

@cnrudd
Copy link
Member

cnrudd commented Jun 2, 2022

ExceptionRenderer prints out t.message and t.cause properties but I have come across a few endpoints that put the meat of their error message in a property called t.content.

Debugging chores would benefit greatly and take a lot less time if t.content were added to all of ExceptionRenderer's output.

@lbwexler
Copy link
Member

Colin -- is it fair to say you are talking about this exception that we generate here in JsonClient? That you should think it should be serialized with the content, if appropriate? To be clear this is specific to REST and HTTP exceptions.

throw new ExternalHttpException("Failure calling ${method.uri} : $statusText", cause, statusCode)

Makes sense, just want to clarify that

@lbwexler
Copy link
Member

lbwexler commented Aug 19, 2022

So colin and I looked at this -- this is just a particular property that is surfaced in a client-specific HttpException. So the ticket is a bit more tricky that the title implies.

But the general goal is good. Perhaps JSONClient should extract useful information from the "content" of the return into the frameworks ExternalHttpException. This could perhaps be partially elevated into the message, or at least made available
in the JSONFormat.

@lbwexler lbwexler changed the title Add content to list of properties printed by ExceptionRenderer Enhance ExternalHttpException to provide information from content. Aug 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants