fix(http): downgrade canOnboard check to warning log level (#1859)

This commit is contained in:
soup 2024-12-06 13:01:45 +01:00 committed by GitHub
parent ac1974c8d5
commit 99a9e6bc0f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 17 additions and 0 deletions

View file

@ -156,6 +156,10 @@ func (h authHandler) onboard(w http.ResponseWriter, r *http.Request) {
func (h authHandler) canOnboard(w http.ResponseWriter, r *http.Request) {
if status, err := h.onboardEligible(r.Context()); err != nil {
if status == http.StatusServiceUnavailable {
h.encoder.StatusWarning(w, status, err.Error())
return
}
h.encoder.StatusError(w, status, err)
return
}