SameerMesiah97 commented on code in PR #68951:
URL: https://github.com/apache/airflow/pull/68951#discussion_r3469575597


##########
providers/keycloak/src/airflow/providers/keycloak/auth_manager/keycloak_auth_manager.py:
##########
@@ -78,6 +78,13 @@
 log = logging.getLogger(__name__)
 
 RESOURCE_ID_ATTRIBUTE_NAME = "resource_id"
+KEYCLOAK_RESOURCE_NOT_FOUND_ERROR = "resource not found:"
+
+
+def _is_missing_keycloak_resource_response(status_code: int, text: Any) -> 
bool:
+    return status_code == 500 and isinstance(text, str) and 
KEYCLOAK_RESOURCE_NOT_FOUND_ERROR in text.lower()

Review Comment:
   Are the helper and cosntant needed here? They are only being used once. 
Also, is 500 + "resource not found:" a documented Keycloak response that we can 
reliably depend on?



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to