Skip to content

Commit

Permalink
Adding checks for correct response
Browse files Browse the repository at this point in the history
  • Loading branch information
COMTOP1 committed Dec 23, 2023
1 parent 032b4b4 commit b0ae278
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions server/views/websiteCheck.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,9 @@ func (v *Views) websiteCheck(endpoint string) bool {
log.Printf("failed to read body for website check: %+v", err)
return true // sending back true if the checker is down
}
if res.StatusCode >= 500 && res.StatusCode < 600 {
log.Printf("failed to get correct status from cobra: %d", res.StatusCode)
return true // sending back true if the checker is down
}
return string(body) == "Accepted"
}

0 comments on commit b0ae278

Please sign in to comment.