Skip to content

Commit

Permalink
fix(iamauthz): forward rate limiting errors without authorization
Browse files Browse the repository at this point in the history
  • Loading branch information
odsod committed Feb 26, 2024
1 parent db65869 commit 44e75e7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion iamauthz/middleware.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ func RequireAuthorizationUnaryInterceptor(
) (interface{}, error) {
ctx = WithAuthorization(ctx)
resp, err := handler(ctx, req)
if code := status.Code(err); code == codes.Unauthenticated || code == codes.PermissionDenied {
if code := status.Code(err); code == codes.Unauthenticated ||
code == codes.PermissionDenied ||
code == codes.ResourceExhausted {
return nil, err
}
value := ctx.Value(contextKey{}).(*contextValue)
Expand Down

0 comments on commit 44e75e7

Please sign in to comment.