-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Closed
Labels
🚨This issue needs some love.This issue needs some love.triage meI really want to be triaged.I really want to be triaged.
Description
From the discover tools, media().download(...) is triggering a request to https://youtubereporting.googleapis.com/v1/media/test?alt=json which is returning a 400 for me with the following content:
[{
"error": {
"code": 400,
"message": "Invalid value for query parameter 'alt'. It must be set to \"media\".",
"errors": [
{
"message": "Invalid value for query parameter 'alt'. It must be set to \"media\".",
"domain": "global",
"reason": "badRequest"
}
],
"status": "INVALID_ARGUMENT"
}
}
]
The contents of the response are put into an HttpError in HttpRequest.execute but the _get_reason expects {"error": ...} directly instead of [{"error": ...}] so it is crashing with
<type 'str'>: (<type 'exceptions.TypeError'>, TypeError('list indices must be integers, not str',))
I'm not sure if there is a valid reason to have a list of errors and the client code should support it or if the server code should return a single error with the "errors" subelement filled in (as it is).
Metadata
Metadata
Assignees
Labels
🚨This issue needs some love.This issue needs some love.triage meI really want to be triaged.I really want to be triaged.