You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/03/30 02:22:20 UTC

[GitHub] [apisix] shuaijinchao commented on a change in pull request #6745: fix: hide 5xx error message from client

shuaijinchao commented on a change in pull request #6745:
URL: https://github.com/apache/apisix/pull/6745#discussion_r838057174



##########
File path: apisix/plugins/authz-keycloak.lua
##########
@@ -581,17 +582,17 @@ local function evaluate_permissions(conf, ctx, token)
         -- Ensure service account access token.
         local sa_access_token, err = authz_keycloak_ensure_sa_access_token(conf)
         if err then
-            return 500, err
+            return 503
         end
 
         -- Resolve URI to resource(s).
         permission, err = authz_keycloak_resolve_resource(conf, ctx.var.request_uri,
                                                           sa_access_token)
 
         -- Check result.
-        if permission == nil then
+        if permission == nil or err then
             -- No result back from resource registration endpoint.
-            return 500, err
+            return 503

Review comment:
       ditto




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org