diff --git a/peer/http3/server.go b/peer/http3/server.go index 6f18db3..9be4f9c 100644 --- a/peer/http3/server.go +++ b/peer/http3/server.go @@ -70,6 +70,10 @@ func (s *Server) Start(address string) error { requestedBlob := vars["hash"] blob, err := s.store.Get(requestedBlob) if err != nil { + if errors.Is(err, store.ErrBlobNotFound) { + http.Error(w, err.Error(), http.StatusNotFound) + return + } fmt.Printf("%s: %s", requestedBlob, errors.FullTrace(err)) s.logError(err) http.Error(w, err.Error(), http.StatusBadRequest)