diff options
| author | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2026-04-02 15:46:18 +0900 |
|---|---|---|
| committer | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2026-04-02 15:46:18 +0900 |
| commit | 776376dda8005635c4c3365905ca7df857789fec (patch) | |
| tree | 09a8f134929007b58981e6c5e756c3f3b4d3cbda /services/api/src/trading_api/routers/strategies.py | |
| parent | 8da5fb843856bb6585c6753f44d422beaa4a8204 (diff) | |
refactor: specialize exception handling across all services
Diffstat (limited to 'services/api/src/trading_api/routers/strategies.py')
| -rw-r--r-- | services/api/src/trading_api/routers/strategies.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/services/api/src/trading_api/routers/strategies.py b/services/api/src/trading_api/routers/strategies.py index 7ddd54e..5db7320 100644 --- a/services/api/src/trading_api/routers/strategies.py +++ b/services/api/src/trading_api/routers/strategies.py @@ -42,6 +42,9 @@ async def list_strategies(): } for s in strategies ] + except (ImportError, FileNotFoundError) as exc: + logger.error("Strategy loading error: %s", exc) + raise HTTPException(status_code=503, detail="Strategy engine unavailable") except Exception as exc: - logger.error("Failed to list strategies: %s", exc) + logger.error("Failed to list strategies: %s", exc, exc_info=True) raise HTTPException(status_code=500, detail="Failed to list strategies") |
