We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents b191b5c + 1edefdf commit 491a2cbCopy full SHA for 491a2cb
services/common/rs_server_common/authentication/keycloak_util.py
@@ -87,8 +87,10 @@ def get_user_info(self, user_id: str) -> KCInfo:
87
88
# If the user is not found, this means he was removed from keycloak.
89
# Thus we must remove all his api keys from the database.
90
- if (error.response_code == HTTP_404_NOT_FOUND) and (
91
- "User not found" in error.response_body.decode("utf-8")
+ if (
+ error.response_code == HTTP_404_NOT_FOUND
92
+ and error.response_body is not None
93
+ and "User not found" in error.response_body.decode("utf-8")
94
):
95
logger.warning(f"User '{user_id}' not found in keycloak.")
96
return KCInfo(False, [])
0 commit comments