Skip to content

Conversation

hiranya911
Copy link
Contributor

@hiranya911 hiranya911 commented May 25, 2018

Resolves #149

go/firebase-go-iid-errors


if msg, ok := errorCodes[resp.Status]; ok {
return fmt.Errorf("instance id %q: %s", iid, msg)
if info, ok := errorCodes[resp.Status]; ok {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I notice we're only using the http status code here. Can't our APIs return more specific error codes in the body of the response? Or am I thinking of something else?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The endpoint we use for this functionality today signals errors via HTTP status code. In the future the backend service will send more detailed and well-formed error responses.

@hiranya911 hiranya911 assigned hiranya911 and unassigned bklimt May 29, 2018
@hiranya911 hiranya911 merged commit 2554cb5 into dev May 31, 2018
@hiranya911 hiranya911 deleted the hkj-iid-error branch May 31, 2018 18:14
hiranya911 added a commit that referenced this pull request Jun 12, 2018
* Improved error handling in iid package

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

Successfully merging this pull request may close these issues.

2 participants