From 6f8f60371f291aa1c1b3b3520b5cecef151f91fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Duffeck?= Date: Wed, 20 Nov 2024 08:58:28 +0100 Subject: [PATCH] Handle permission denied errors when touching the new file Co-authored-by: Christian Richter --- internal/http/services/appprovider/appprovider.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/internal/http/services/appprovider/appprovider.go b/internal/http/services/appprovider/appprovider.go index 9d93b18621..1ad71290cf 100644 --- a/internal/http/services/appprovider/appprovider.go +++ b/internal/http/services/appprovider/appprovider.go @@ -237,6 +237,10 @@ func (s *svc) handleNew(w http.ResponseWriter, r *http.Request) { } if touchRes.Status.Code != rpc.Code_CODE_OK { + if touchRes.Status.Code == rpc.Code_CODE_PERMISSION_DENIED { + writeError(w, r, appErrorPermissionDenied, "touching the file failed", nil) + return + } writeError(w, r, appErrorServerError, "touching the file failed", nil) return }