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

Remote API error handling: expose response string #15

Closed

Conversation

atc0005
Copy link
Collaborator

@atc0005 atc0005 commented Apr 9, 2020

Summary

Extend error handling by retrieving and providing the response string from the remote API as part of the error message returned to the caller if the status code indicates an error condition.

Based on testing, the response string contains useful troubleshooting information which can help identify missing information in the submitted MessageCard payload.

Note

This Pull Request contains example logger object calls to illustrate the proposed changes mentioned in #10. These logger calls are included in this PR only for discussion purposes.

Before this PR would be merged, those logger calls would be removed, the associated branch rebased, and those changes set aside for potential implementation as part of a separate PR specific to #10.

refs #10, #6 (loosely)

Extend error handling by retrieving and providing the
response string from the remote API as part of the error
message returned to the caller if the status code
indicates an error condition.

Based on testing, the response string contains useful
troubleshooting information which can help identify
missing information in the submitted MessageCard payload.

---

Note: This commit contains example `logger` object calls
to illustrate the proposed changes mentioned in #10. Before
the associated PR would be merged, those `logger` calls
would be removed and implemented as part of a separate
PR specific to #10.

refs #10, #6 (loosely)
@atc0005 atc0005 requested a review from dasrick April 9, 2020 11:49
@atc0005
Copy link
Collaborator Author

atc0005 commented Apr 18, 2020

@dasrick Any feedback on this PR? codeclimate doesn't like the additional return statements, but some additional refactoring may be able to resolve that.

As I mentioned, this PR also showcases some package-level logger calls proposed in #10. These would be removed from this PR and implemented separately.

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.

1 participant