(err error)
| 64 | } |
| 65 | |
| 66 | func IsNotAuthorizedError(err error) bool { |
| 67 | if err == nil { |
| 68 | return false |
| 69 | } |
| 70 | if xerrors.Is(err, ErrNoActor) { |
| 71 | return true |
| 72 | } |
| 73 | |
| 74 | return xerrors.As(err, &NotAuthorizedError{}) |
| 75 | } |
| 76 | |
| 77 | func logNotAuthorizedError(ctx context.Context, logger slog.Logger, err error) error { |
| 78 | // Only log the errors if it is an UnauthorizedError error. |