Skip to content

Commit

Permalink
Log critical errors
Browse files Browse the repository at this point in the history
  • Loading branch information
the-maldridge committed May 31, 2021
1 parent d6eb41b commit ccc35ee
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,19 @@ func doProbe(w http.ResponseWriter, r *http.Request) {

repodata, _, err := fetch("http://" + target + "/" + arch + "-repodata")
if err != nil {
log.Printf("Error fetching repodata: %s", err)
http.Error(w, "Error fetching repodata: "+err.Error(), http.StatusPreconditionFailed)
}

_, stagedataStatusCode, err := fetch("http://" + target + "/" + arch + "-stagedata")
if err != nil {
log.Printf("Error fetching stagedata: %s", err)
http.Error(w, "Error fetching stagedata: "+err.Error(), http.StatusPreconditionFailed)
}

otimes, c, err := fetch("http://" + target + "/otime")
if err != nil {
log.Println("Error fetching origin timestamp file: %s", err)
http.Error(w, "Error fetching origin time: "+err.Error(), http.StatusPreconditionFailed)
}
var otime float64
Expand Down

0 comments on commit ccc35ee

Please sign in to comment.