-
Notifications
You must be signed in to change notification settings - Fork 2.6k
details missing in googleapiclient.errors.HttpError #382
Copy link
Copy link
Closed
Labels
🚨This issue needs some love.This issue needs some love.priority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release.Important issue which blocks shipping the next release. Will be fixed prior to next release.status: acknowledgedtype: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Metadata
Metadata
Assignees
Labels
🚨This issue needs some love.This issue needs some love.priority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release.Important issue which blocks shipping the next release. Will be fixed prior to next release.status: acknowledgedtype: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Run some code that makes an invalid request.
Now when you get the exception and its
contentthe error becomes slightly more verbose.{ "error": { "code": 400, "message": "Invalid request.", "errors": [ { "message": "Invalid request.", "domain": "global", "reason": "badRequest" } ], "status": "INVALID_ARGUMENT" } }Making the same request manually to the REST API returns a significantly more useful response.
{ "error": { "code": 400, "message": "Invalid request.", "status": "INVALID_ARGUMENT", "details": [ { "@type": "type.googleapis.com/google.rpc.BadRequest", "fieldViolations": [ { "field": "service.split.allocations[1]", "description": "Allocation must be a value in the range (0, 1]." }, { "field": "service.split.allocations", "description": "Traffic allocations must sum to 1." } ] } ] } }