Skip to content
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

cannot parse error response for REST #730

Closed
arithmetic1728 opened this issue Jan 11, 2021 · 0 comments · Fixed by #738
Closed

cannot parse error response for REST #730

arithmetic1728 opened this issue Jan 11, 2021 · 0 comments · Fixed by #738
Assignees
Labels
🚨 This issue needs some love. triage me I really want to be triaged. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@arithmetic1728
Copy link
Collaborator

arithmetic1728 commented Jan 11, 2021

If response code is not 200, then response.content will be an error message. The following code cannot parse this error message, and an exception will be thrown.

Example response.content:
{\n"error": {\n "code": 403,\n "message": "Request is prohibited by organization\'s policy. vpcServiceControlsUniqueIdentifier: a69c658379e4178a",\n "errors": [\n {\n "message": "Request is prohibited by organization\'s policy. vpcServiceControlsUniqueIdentifier: a69c658379e4178a",\n "domain": "global",\n "reason": "forbidden"\n }\n ],\n "status": "PERMISSION_DENIED"\n }\n}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🚨 This issue needs some love. triage me I really want to be triaged. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants