chore: return context.Canceled when in Prepare for rbac (#10763)

Was returning a custom rego canceled error. This conforms with
how Authorize handles this error.
This commit is contained in:
Steven Masley 2023-11-17 14:28:59 -06:00 committed by GitHub
parent 875cae1fc9
commit 0f17d7c144
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -395,6 +395,7 @@ func (a RegoAuthorizer) Prepare(ctx context.Context, subject Subject, action Act
prepared, err := a.newPartialAuthorizer(ctx, subject, action, objectType)
if err != nil {
err = correctCancelError(err)
return nil, xerrors.Errorf("new partial authorizer: %w", err)
}