Skip to content

Commit

Permalink
Make proxy treat 403 error as rpc PermissionDenied
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Farries authored and roboquat committed May 17, 2022
1 parent a645a8c commit 155efaa
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions components/public-api-server/pkg/proxy/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ func ConvertError(err error) error {
return status.Error(codes.PermissionDenied, s)
}

// components/gitpod-protocol/src/messaging/error.ts
if strings.Contains(s, "code 403") {
return status.Error(codes.PermissionDenied, s)
}

// components/gitpod-protocol/src/messaging/error.ts
if strings.Contains(s, "code 404") {
return status.Error(codes.NotFound, s)
Expand Down

0 comments on commit 155efaa

Please sign in to comment.