Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion frontend/src/components/valuecell/form/exchange-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
});
}
};
Expand Down
12 changes: 10 additions & 2 deletions python/valuecell/server/api/routers/strategy_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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")
Expand Down