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

Return error response based on caught exception from postData #164

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mkienenb
Copy link
Contributor

@mkienenb mkienenb commented Jun 4, 2020

I'm resubmitting this pull request.

The original PR #89 was cancelled without fixing the general issue (caught exceptions are logged but return null responses) because the symptom was fixed (xml parsing exception).

Summary of the general issue:

When an exception occurs during an ANetApiResponse.get(), the exception is sent to the logger, and the method returns null instead of a valid ANetApiResponse. The API eventually returns a null response to the caller with no information about what occurred.

This PR returns an error ANetApiResponse containing the information from the exception instead of null if an exception is caught, which allows the caller to do something with the exception.

[Note: the updated CONTRIBUTING.md guidelines refer to the future branch, which no longer exists.]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant