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

Return specific error/code from create admin API call #492

Closed
chancez opened this issue Jun 28, 2016 · 0 comments
Closed

Return specific error/code from create admin API call #492

chancez opened this issue Jun 28, 2016 · 0 comments

Comments

@chancez
Copy link
Contributor

chancez commented Jun 28, 2016

It would be great to get an HTTP 409, and/or a better error when attempting to create a user that already exists. Currently I get the following type back from the generated client:

&googleapi.Error{Code:400, Message:"", Body:"{\"error\":\"bad_request\",\"error_description\":\"Email already in use.\"}", Errors:[]googleapi.ErrorItem(nil)}

Additionally, having a function I can use like IsErrorAlreadyExists(err error) bool would be the preferred way to check, rather than having to guess how to inspect the error type.

Similar to #470

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants