Merge pull request #1 from bilus/bugfix-gomod-sum-missing

Bugfix: return error when go.mod can't be loaded
This commit is contained in:
Marcin Bilski 2022-05-11 11:26:38 +02:00 committed by GitHub
commit 0837c80915
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -303,9 +303,11 @@ func (api *api) mod(w http.ResponseWriter, r *http.Request, module, version stri
} }
} }
} }
w.Write([]byte(fmt.Sprintf("module %s\n", module)))
return
} }
} }
w.Write([]byte(fmt.Sprintf("module %s\n", module))) http.Error(w, err.Error(), http.StatusBadRequest)
} }
func (api *api) zip(w http.ResponseWriter, r *http.Request, module, version string) { func (api *api) zip(w http.ResponseWriter, r *http.Request, module, version string) {