Skip to content

Improve partial error handling.#488

Merged
nwbirnie merged 3 commits intomainfrom
pf
Oct 26, 2021
Merged

Improve partial error handling.#488
nwbirnie merged 3 commits intomainfrom
pf

Conversation

@nwbirnie
Copy link
Copy Markdown
Contributor

@nwbirnie nwbirnie commented Sep 28, 2021

response.getPartialFailureError().getDetailsCount() always returns 1. It is an instance of GoogleAdsFailure which needs to be interrogated to get the failed operations.

See http://screenshot/4MPH9EHkPGm5MqK

Also made some improvements to the ErrorUtils class:

  • rethrow InvalidProtocolBufferException as an unchecked exception
  • add convenience method to get GoogleAdsFailure from Status.
  • add convenience method to get failed operation indices from GoogleAdsErrors.

Change-Id: I983fc586937c1869d432ccc60429e78007f7df6e

response.getPartialFailureError().getDetailsCount() always returns 1. It is an instance of GoogleAdsFailure which needs to be interrogated to get the failed operations.

Change-Id: I983fc586937c1869d432ccc60429e78007f7df6e
Change-Id: I51e113012eff9be1b0c3a049e204756eee2d558d
@nwbirnie nwbirnie changed the title Fix the partial error handling. Improve partial error handling. Sep 29, 2021
@nwbirnie nwbirnie requested a review from jradcliff September 29, 2021 12:21
Change-Id: Ibb284f98d3b53d5b9a3ab8b1a9f9d38c779a9245
@nwbirnie nwbirnie requested a review from jradcliff October 26, 2021 17:10
@nwbirnie nwbirnie merged commit d13a199 into main Oct 26, 2021
@nwbirnie nwbirnie deleted the pf branch October 26, 2021 17:25
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.

3 participants