Replace QUIC with HTTP3/QUIC #43
1 changed files with 4 additions and 0 deletions
|
@ -70,6 +70,10 @@ func (s *Server) Start(address string) error {
|
||||||
requestedBlob := vars["hash"]
|
requestedBlob := vars["hash"]
|
||||||
blob, err := s.store.Get(requestedBlob)
|
blob, err := s.store.Get(requestedBlob)
|
||||||
if err != nil {
|
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))
|
fmt.Printf("%s: %s", requestedBlob, errors.FullTrace(err))
|
||||||
s.logError(err)
|
s.logError(err)
|
||||||
http.Error(w, err.Error(), http.StatusBadRequest)
|
http.Error(w, err.Error(), http.StatusBadRequest)
|
||||||
|
|
Loading…
Reference in a new issue