fix: request to preview gives 500 error for old/new webdav if file is in processing (#7507)
* fix: request to preview gives 500 error for old/new webdav if file is in processing * add changelog
This commit is contained in:
@@ -260,7 +260,7 @@ func (g Webdav) SpacesThumbnail(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
case http.StatusTooEarly:
|
||||
// StatusTooEarly if file is processing
|
||||
renderError(w, r, errTooEarly(err.Error()))
|
||||
renderError(w, r, errTooEarly(e.Detail))
|
||||
return
|
||||
case http.StatusBadRequest:
|
||||
renderError(w, r, errBadRequest(e.Detail))
|
||||
@@ -351,6 +351,10 @@ func (g Webdav) Thumbnail(w http.ResponseWriter, r *http.Request) {
|
||||
// StatusNotFound is expected for unsupported files
|
||||
renderError(w, r, errNotFound(notFoundMsg(tr.Filename)))
|
||||
return
|
||||
case http.StatusTooEarly:
|
||||
// StatusTooEarly if file is processing
|
||||
renderError(w, r, errTooEarly(e.Detail))
|
||||
return
|
||||
case http.StatusBadRequest:
|
||||
renderError(w, r, errBadRequest(e.Detail))
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user