From 734860bdeccac7e6e093378570cb62325f5d95a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Tue, 20 Feb 2024 13:08:57 +0100 Subject: [PATCH] align some ocs status codes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jörn Friedrich Dreyer --- changelog/unreleased/legacy-return-code.md | 4 ++++ .../owncloud/ocs/handlers/apps/sharing/shares/shares.go | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 changelog/unreleased/legacy-return-code.md diff --git a/changelog/unreleased/legacy-return-code.md b/changelog/unreleased/legacy-return-code.md new file mode 100644 index 0000000000..4bd7154317 --- /dev/null +++ b/changelog/unreleased/legacy-return-code.md @@ -0,0 +1,4 @@ +Bugfix: We aligned some OCS return codes with oc10 + +https://github.com/cs3org/reva/pull/4529 +https://github.com/owncloud/ocis/issues/1233 diff --git a/internal/http/services/owncloud/ocs/handlers/apps/sharing/shares/shares.go b/internal/http/services/owncloud/ocs/handlers/apps/sharing/shares/shares.go index 59c5ed2f47..4ce0c5bf8f 100644 --- a/internal/http/services/owncloud/ocs/handlers/apps/sharing/shares/shares.go +++ b/internal/http/services/owncloud/ocs/handlers/apps/sharing/shares/shares.go @@ -693,7 +693,7 @@ func (h *Handler) GetShare(w http.ResponseWriter, r *http.Request) { if share == nil { sublog.Debug().Msg("no share found with this id") - response.WriteOCSError(w, r, response.MetaNotFound.StatusCode, "share not found", nil) + response.WriteOCSError(w, r, response.MetaPathNotFound.StatusCode, "share not found", nil) // MetaNotFount with code 998 would be cleaner, but this is a legacy api return }