This commit is contained in:
ponzischeme89
2026-08-11 15:18:26 +12:00
parent 594159c0ae
commit 5e5849f985
33 changed files with 1143 additions and 241 deletions
+8
View File
@@ -566,6 +566,14 @@ func (s *Server) writeUpstreamError(
case apiErr.StatusCode == http.StatusNotFound:
writeError(w, http.StatusNotFound, "not found on the emby server")
return
case apiErr.StatusCode == http.StatusTooManyRequests:
retryAfter := strings.TrimSpace(apiErr.RetryAfter)
if retryAfter == "" {
retryAfter = "60"
}
w.Header().Set("Retry-After", retryAfter)
writeError(w, http.StatusTooManyRequests, "the emby server is receiving too many requests")
return
}
}
s.loggerFor(ctx).Error(message, "error", err)