cmd/syncthing: Return "Forbidden" for REST API debug endpoints when debugging disabled

The previous "Bad Request" was really confusing as it implies it's
somethign wrong with the request, which there isn't - the problem is
that server configuration forbids the request.
This commit is contained in:
Jakob Borg 2018-09-16 09:32:24 +02:00
parent b19885fdb3
commit 84494edab4

View File

@ -592,7 +592,7 @@ func (s *apiService) whenDebugging(h http.Handler) http.Handler {
return
}
http.Error(w, "Debugging disabled", http.StatusBadRequest)
http.Error(w, "Debugging disabled", http.StatusForbidden)
})
}