mirror of
https://github.com/matrix-org/matrix-spec
synced 2025-12-20 16:38:37 +01:00
Add comment
This commit is contained in:
parent
866fa58276
commit
c432396079
|
|
@ -197,6 +197,8 @@ func (s *server) serveSpec(w http.ResponseWriter, req *http.Request) {
|
|||
var sha string
|
||||
|
||||
if strings.ToLower(req.URL.Path) == "/spec/head" {
|
||||
// err may be non-nil here but if headSha is non-empty we will serve a possibly-stale result in favour of erroring.
|
||||
// This is to deal with cases like where github is down but we still want to serve the spec.
|
||||
if headSha, err := s.lookupHeadSHA(); headSha == "" {
|
||||
writeError(w, 500, err)
|
||||
return
|
||||
|
|
|
|||
Loading…
Reference in a new issue