Skip to content

Commit

Permalink
Add http body to list handler on error (#1974)
Browse files Browse the repository at this point in the history
Mimic responses to that of proxy.golang.org when a list fails to produce a result.
  • Loading branch information
sanyatuning authored Sep 9, 2024
1 parent 34002b8 commit 70ee634
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg/download/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ func ListHandler(dp Protocol, lggr log.Entry, df *mode.DownloadFile) http.Handle
err = errors.E(op, err, severityLevel)
lggr.SystemErr(err)
w.WriteHeader(errors.Kind(err))
_, _ = fmt.Fprintf(w, "not found: %s", strings.Replace(err.Error(), "exit status 1: go: ", "", 1))
return
}

Expand Down

0 comments on commit 70ee634

Please sign in to comment.