diff --git a/frontend/src/components/valuecell/form/exchange-form.tsx b/frontend/src/components/valuecell/form/exchange-form.tsx index e4886b8cf..be76d3dfe 100644 --- a/frontend/src/components/valuecell/form/exchange-form.tsx +++ b/frontend/src/components/valuecell/form/exchange-form.tsx @@ -128,7 +128,9 @@ export const ExchangeForm = withForm({ } catch (_error) { setTestStatus({ success: false, - message: "Failed, please check your API key", + message: + "Connection failed. Please check your API Key, Secret Key, or " + + "Passphrase.", }); } }; diff --git a/python/valuecell/server/api/routers/strategy_agent.py b/python/valuecell/server/api/routers/strategy_agent.py index ec0aa6ac3..4acc78992 100644 --- a/python/valuecell/server/api/routers/strategy_agent.py +++ b/python/valuecell/server/api/routers/strategy_agent.py @@ -282,7 +282,11 @@ async def test_exchange_connection(request: ExchangeConfig): # But SuccessResponse implies 200. # If I raise HTTPException it shows as error. raise HTTPException( - status_code=400, detail="Failed, please check your API key" + status_code=400, + detail=( + "Connection failed. Please check your API Key, " + "Secret Key, or Passphrase." + ), ) finally: await gateway.close() @@ -291,7 +295,11 @@ async def test_exchange_connection(request: ExchangeConfig): # If create_ccxt_gateway fails or other error, avoid logging sensitive info logger.warning("Connection test failed") raise HTTPException( - status_code=400, detail="Failed, please check your API key" + status_code=400, + detail=( + "Connection failed. Please check your API Key, " + "Secret Key, or Passphrase." + ), ) @router.delete("/delete")