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

fix(get): Get returns 404 if dataset is not found #695

Merged
merged 1 commit into from
Feb 20, 2019
Merged

Conversation

dustmop
Copy link
Contributor

@dustmop dustmop commented Feb 20, 2019

No description provided.

@ghost ghost assigned dustmop Feb 20, 2019
@ghost ghost added the in progress label Feb 20, 2019
@dustmop
Copy link
Contributor Author

dustmop commented Feb 20, 2019

Depends upon qri-io/registry#27. Fixes 2/4 parts of qri-io/frontend#464.

@dustmop dustmop requested a review from b5 February 20, 2019 21:49
Copy link
Member

@b5 b5 left a comment

Choose a reason for hiding this comment

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

dope. LGTM

@@ -131,6 +132,11 @@ func (h *RegistryHandlers) registryDatasetHandler(w http.ResponseWriter, r *http

err = h.RegistryRequests.GetDataset(&ref, res)
if err != nil {
// If error was that the dataset wasn't found, send back 404 Not Found.
if strings.HasPrefix(err.Error(), "error 404") {
Copy link
Member

Choose a reason for hiding this comment

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

we should make this a more robust thing later, like, you know, returning proper status codes :/

@dustmop dustmop merged commit 870a8e8 into master Feb 20, 2019
@ghost ghost removed the in progress label Feb 20, 2019
@dustmop dustmop deleted the reg-get-404 branch February 20, 2019 22:03
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