From b87441bf03f55970b7a214b781c6f4d9cfe23dd1 Mon Sep 17 00:00:00 2001 From: kuan Date: Tue, 19 Aug 2025 22:24:55 +0800 Subject: [PATCH] fix: oauth scope error mechanism --- oauth/oauth.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/oauth/oauth.go b/oauth/oauth.go index 2dabc534..9a9827fb 100644 --- a/oauth/oauth.go +++ b/oauth/oauth.go @@ -85,7 +85,7 @@ func VerifyOAuth( } if !verifyScope(token.Claims.(*models.NrfAccessTokenAccessTokenClaims).Scope, serviceName) { - return errors.Wrapf(err, "verify OAuth scope") + return errors.New("OAuth scope verification failed: insufficient permissions") } return nil }