From 996eab576c11752ffaf677f2c33fafd6768230c1 Mon Sep 17 00:00:00 2001 From: Jat Date: Mon, 26 Dec 2022 17:51:40 +0800 Subject: [PATCH] update forward api Signed-off-by: Jat --- python/fate_flow/utils/api_utils.py | 2 ++ 1 file changed, 2 insertions(+) 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', {})