Skip to content

Commit

Permalink
Merge pull request #4865 from 2403905/fix-appnew-brake
Browse files Browse the repository at this point in the history
Permission denied is now backing the request.
  • Loading branch information
2403905 committed Sep 24, 2024
2 parents 21f62e9 + 3792d96 commit 9635c6d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions changelog/unreleased/fix-app-new-response-add.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Bugfix: Better response codes for app new endpoint

We fixed the response codes for the app new endpoint. Permission denied is now backing the request.

https://github.com/cs3org/reva/pull/4865
1 change: 1 addition & 0 deletions internal/http/services/appprovider/appprovider.go
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,7 @@ func (s *svc) handleNew(w http.ResponseWriter, r *http.Request) {
switch createRes.Status.Code {
case rpc.Code_CODE_PERMISSION_DENIED:
writeError(w, r, appErrorPermissionDenied, "permission denied to create the file", nil)
return
case rpc.Code_CODE_NOT_FOUND:
writeError(w, r, appErrorNotFound, "parent container does not exist", nil)
return
Expand Down

0 comments on commit 9635c6d

Please sign in to comment.