ip2k / google-api-ruby-client

Automatically exported from code.google.com/p/google-api-ruby-client
Apache License 2.0
0 stars 0 forks source link

Errors are hard to test for #47

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Do a execute
2. Try to find out if it failed

What is the expected output? What do you see instead?
I would expect some is_error? on Google::APIClient::Result or error method 
returning null if there is no error.

Instead, I can choose between execute! and stuff like result.response.status 
and result.data.respond_to?(:error)

What version of the product are you using? On what operating system?
0.4.4 on linux

Please provide any additional information below.

Also, I seem unable to post to google group at 
https://groups.google.com/forum/?fromgroups#!forum/google-analytics-data-export-
api ...

Original issue reported on code.google.com by adwo...@ipdgroup.com on 16 Jul 2012 at 5:11

GoogleCodeExporter commented 9 years ago
This is an unfortunate side-effect of errors not having a defined schema.

Original comment by bobaman@google.com on 23 Jul 2012 at 7:24

GoogleCodeExporter commented 9 years ago

Original comment by bobaman@google.com on 23 Jul 2012 at 7:35

GoogleCodeExporter commented 9 years ago
Will be fixed in next release. Should be able to do something like:

if result.error?
  print result.error_message
end

Original comment by sba...@google.com on 25 Jul 2012 at 3:36

GoogleCodeExporter commented 9 years ago
I still really want a formal JSON schema for error messages.

Original comment by bobaman@google.com on 6 Aug 2012 at 4:21