FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Return error response based on caught exception from postData by mkienenb · Pull Request #164 · AuthorizeNet/sdk-java · GitHub

Return error response based on caught exception from postData - #164

Open
mkienenb wants to merge 1 commit into
AuthorizeNet:masterfrom
mkienenb:return-error-response-on-http-utility-post-data-exception
Open

Return error response based on caught exception from postData#164
mkienenb wants to merge 1 commit into
AuthorizeNet:masterfrom
mkienenb:return-error-response-on-http-utility-post-data-exception

Conversation

mkienenb commented Jun 4, 2020

Copy link
Copy Markdown
Contributor

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.]

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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


Back | FazBrowse Home | New Git URL