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

Support unsuccessful request responses #15

Merged
merged 1 commit into from
Dec 22, 2020

Conversation

PatrickTasse
Copy link
Contributor

When a TSP request response is received with an unsuccessful status code
and without a json object model, the parsing of the body as json was
throwing an error and the status code was unavailable to the caller.

Create the TspClientResponse with the plain text of the response, and
make the model optional. Make the plain text available to the caller. Do
not throw an error when the json object is absent.

Signed-off-by: Patrick Tasse patrick.tasse@gmail.com

When a TSP request response is received with an unsuccessful status code
and without a json object model, the parsing of the body as json was
throwing an error and the status code was unavailable to the caller.

Create the TspClientResponse with the plain text of the response, and
make the model optional. Make the plain text available to the caller. Do
not throw an error when the json object is absent.

Signed-off-by: Patrick Tasse <patrick.tasse@gmail.com>
Copy link

@MatthewKhouzam MatthewKhouzam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

eclipse-cdt-cloud/trace-server-protocol#43 (comment) please align with this? and mention it in the commit message.

Copy link

@MatthewKhouzam MatthewKhouzam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With the comment this makes sense!

@PatrickTasse PatrickTasse merged commit 2c0c62f into eclipse-cdt-cloud:master Dec 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants