Skip to content

Commit

Permalink
fix(webdav): missing Status 429 handling in some thumbnail endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
rhafer committed Oct 10, 2024
1 parent e15715e commit fda825d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions services/webdav/pkg/service/v0/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,8 @@ func (g Webdav) Thumbnail(w http.ResponseWriter, r *http.Request) {
// StatusTooEarly if file is processing
renderError(w, r, errTooEarly(e.Detail))
return
case http.StatusTooManyRequests:
renderError(w, r, errTooManyRequests(e.Detail))
case http.StatusBadRequest:
renderError(w, r, errBadRequest(e.Detail))
case http.StatusForbidden:
Expand Down Expand Up @@ -401,6 +403,8 @@ func (g Webdav) PublicThumbnail(w http.ResponseWriter, r *http.Request) {
return
case http.StatusBadRequest:
renderError(w, r, errBadRequest(e.Detail))
case http.StatusTooManyRequests:
renderError(w, r, errTooManyRequests(e.Detail))
default:
renderError(w, r, errInternalError(err.Error()))
}
Expand Down Expand Up @@ -443,6 +447,8 @@ func (g Webdav) PublicThumbnailHead(w http.ResponseWriter, r *http.Request) {
return
case http.StatusBadRequest:
renderError(w, r, errBadRequest(e.Detail))
case http.StatusTooManyRequests:
renderError(w, r, errTooManyRequests(e.Detail))
default:
renderError(w, r, errInternalError(err.Error()))
}
Expand Down

0 comments on commit fda825d

Please sign in to comment.