diff --git a/changelog/unreleased/fix-search-error-message.md b/changelog/unreleased/fix-search-error-message.md new file mode 100644 index 00000000000..61d799d601d --- /dev/null +++ b/changelog/unreleased/fix-search-error-message.md @@ -0,0 +1,5 @@ +Bugfix: Fix search error message + +When fixed the error message returned when the search request is invalid + +https://github.com/owncloud/ocis/issues/8442 diff --git a/services/webdav/pkg/service/v0/search.go b/services/webdav/pkg/service/v0/search.go index 848b77f226b..94c2efbb5c0 100644 --- a/services/webdav/pkg/service/v0/search.go +++ b/services/webdav/pkg/service/v0/search.go @@ -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())) }