fix: bulky error message for invalid search request (#8444)

This commit is contained in:
Sawjan Gurung
2024-02-13 15:58:26 +05:45
committed by GitHub
parent 84dc519d10
commit 911754fd42
2 changed files with 7 additions and 1 deletions

View File

@@ -0,0 +1,6 @@
Bugfix: Fix search error message
We fixed an error message returned when the search request is invalid
https://github.com/owncloud/ocis/pull/8444
https://github.com/owncloud/ocis/issues/8442

View File

@@ -78,7 +78,7 @@ func (g Webdav) Search(w http.ResponseWriter, r *http.Request) {
e := merrors.Parse(err.Error())
switch e.Code {
case http.StatusBadRequest:
renderError(w, r, errBadRequest(err.Error()))
renderError(w, r, errBadRequest(e.Detail))
default:
renderError(w, r, errInternalError(err.Error()))
}