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:
@@ -0,0 +1,6 @@
|
|||||||
|
Bugfix: Fix preview request 500 error when made too early
|
||||||
|
|
||||||
|
Fix the status code and message when a thumbnail request is made too early.
|
||||||
|
|
||||||
|
https://github.com/owncloud/ocis/issues/7502
|
||||||
|
https://github.com/owncloud/ocis/pull/7507
|
||||||
@@ -260,7 +260,7 @@ func (g Webdav) SpacesThumbnail(w http.ResponseWriter, r *http.Request) {
|
|||||||
return
|
return
|
||||||
case http.StatusTooEarly:
|
case http.StatusTooEarly:
|
||||||
// StatusTooEarly if file is processing
|
// StatusTooEarly if file is processing
|
||||||
renderError(w, r, errTooEarly(err.Error()))
|
renderError(w, r, errTooEarly(e.Detail))
|
||||||
return
|
return
|
||||||
case http.StatusBadRequest:
|
case http.StatusBadRequest:
|
||||||
renderError(w, r, errBadRequest(e.Detail))
|
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
|
// StatusNotFound is expected for unsupported files
|
||||||
renderError(w, r, errNotFound(notFoundMsg(tr.Filename)))
|
renderError(w, r, errNotFound(notFoundMsg(tr.Filename)))
|
||||||
return
|
return
|
||||||
|
case http.StatusTooEarly:
|
||||||
|
// StatusTooEarly if file is processing
|
||||||
|
renderError(w, r, errTooEarly(e.Detail))
|
||||||
|
return
|
||||||
case http.StatusBadRequest:
|
case http.StatusBadRequest:
|
||||||
renderError(w, r, errBadRequest(e.Detail))
|
renderError(w, r, errBadRequest(e.Detail))
|
||||||
default:
|
default:
|
||||||
|
|||||||
Reference in New Issue
Block a user