Skip to content

Commit

Permalink
return 500
Browse files Browse the repository at this point in the history
  • Loading branch information
hacdias committed Feb 23, 2023
1 parent 4367fd3 commit 0f13d3c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion gateway/handler_tar.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func (i *handler) serveTAR(ctx context.Context, w http.ResponseWriter, r *http.R
file, err := i.api.GetUnixFsNode(ctx, resolvedPath)
if err != nil {
err = fmt.Errorf("error getting UnixFS node for %s: %w", html.EscapeString(contentPath.String()), err)
webError(w, err, http.StatusBadRequest)
webError(w, err, http.StatusInternalServerError)
return false
}
defer file.Close()
Expand Down
2 changes: 1 addition & 1 deletion gateway/handler_unixfs.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func (i *handler) serveUnixFS(ctx context.Context, w http.ResponseWriter, r *htt
dr, err := i.api.GetUnixFsNode(ctx, resolvedPath)
if err != nil {
err = fmt.Errorf("error while getting UnixFS node: %w", err)
webError(w, err, http.StatusBadRequest)
webError(w, err, http.StatusInternalServerError)
return false
}
defer dr.Close()
Expand Down

0 comments on commit 0f13d3c

Please sign in to comment.