You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for stopping by to let us know something could be better!
PLEASE READ: If you have a support contract with Google, please create an issue in the support console instead of filing on GitHub. This will ensure a timely response.
Is your feature request related to a problem? Please describe.
My team is using the client to download files. A line like:
This threw us for a real loop, because most of these requests work just fine, it was just an occasional file that consistently got a 403. We finally tested the specific file in https://developers.google.com/drive/api/v3/reference/files/export and found that the full response from the API is:
{
"error": {
"errors": [
{
"domain": "global",
"reason": "exportSizeLimitExceeded",
"message": "This file is too large to be exported."
}
],
"code": 403,
"message": "This file is too large to be exported."
}
}
Describe the solution you'd like
It would be great to get that JSON object back in the ClientError's body field, or some other mechanism.
Describe alternatives you've considered
Right now, we're just having to assume that a 403 from this endpoint means that the file is too large. But that's not great, since https://developers.google.com/drive/api/v3/handle-errors lists a whole bunch of reasons that we might be getting a 403.
The text was updated successfully, but these errors were encountered:
I have a workaround that requires one extra call to export_file to get the full error message. Whenever client.export_file(file.id, 'application/pdf', :download_dest => StringIO.new).string is raising an error I'm performing one more request without specifying download_dest parameter: client.export_file(file.id, 'application/pdf').string. That time it returns the full body in JSON format as a part of the exception.
Thanks for stopping by to let us know something could be better!
PLEASE READ: If you have a support contract with Google, please create an issue in the support console instead of filing on GitHub. This will ensure a timely response.
Is your feature request related to a problem? Please describe.
My team is using the client to download files. A line like:
Is raising a
Google::Apis::ClientError
with ane.inspect
like:This threw us for a real loop, because most of these requests work just fine, it was just an occasional file that consistently got a 403. We finally tested the specific file in https://developers.google.com/drive/api/v3/reference/files/export and found that the full response from the API is:
Describe the solution you'd like
It would be great to get that JSON object back in the ClientError's
body
field, or some other mechanism.Describe alternatives you've considered
Right now, we're just having to assume that a 403 from this endpoint means that the file is too large. But that's not great, since https://developers.google.com/drive/api/v3/handle-errors lists a whole bunch of reasons that we might be getting a 403.
The text was updated successfully, but these errors were encountered: