diff --git a/python/fate_flow/utils/api_utils.py b/python/fate_flow/utils/api_utils.py index 6271a1798..2b9b99136 100644 --- a/python/fate_flow/utils/api_utils.py +++ b/python/fate_flow/utils/api_utils.py @@ -312,6 +312,8 @@ def forward_api(role, request_config): role = role.upper() if not hasattr(ServerRegistry, role): ServerRegistry.load() + if not hasattr(ServerRegistry, role): + return {'retcode': 404, 'retmsg': f'role "{role.lower()}" not supported'} registry = getattr(ServerRegistry, role) headers = request_config.get('header', {})