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

In a list response, if there are no keys, 404 to be consistent with GET #1368

Merged
merged 2 commits into from May 3, 2016

Conversation

jefferai
Copy link
Member

@jefferai jefferai commented May 2, 2016

and with different backend conditions

Fixes #1365

respondError(w, http.StatusNotFound, nil)
return
}
keys, ok := keysInt.([]string)
Copy link
Contributor

Choose a reason for hiding this comment

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

Wouldn't it be safer to check if keys was nil here? It seems weird to return a 404 if the data type isn't an []string, since that seems more like a bug.

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.

None yet

2 participants