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
Expose RequestError in GoogleApiException when available #615
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project, in which case you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed, please reply here (e.g.
|
I signed it! |
I'm just curious to know, does it work for you now? I feel that we are missing the JSON tags for all the fields. So for example, I would expect the following property Does that make sense? |
I didn't have to touch the deserialization works, since the Error object was already deserialized and used, even before my change (the message of the exception is computed by calling error.ToString()) I'll remove the extra CTRO, and just pass the Error object via the property - it'll make the code cleaner and simpler. There appears to be 3 tests that fail, but those are not related to the Exception - they are all in the RequestBuilderTest |
@@ -44,6 +44,9 @@ public GoogleApiException(string serviceName, string message, Exception inner) | |||
/// <summary>Creates an API Service exception.</summary> | |||
public GoogleApiException(string serviceName, string message) : this(serviceName, message, null) { } | |||
|
|||
/// <summary>The Error which was returned from the server, or null if unavailable.</summary> |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Are you saying that our tests fail head? I'll need to check that out... Otherwise your change seems ok, just make sure you address my comment and we are ready to go. (check also that you signed the CLA, since this pull request is labeled as cla:no. Thanks! |
Wrap null with code section in comment
I fixed the comment. I've also already signed the CLA. My Google Account uses a different email than my GitHub account, which might have caused an issue... |
I signed it! |
CLAs look good, thanks! |
Expose RequestError in GoogleApiException when available
This should resolve #480