We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8eead38 commit 6a9f6dfCopy full SHA for 6a9f6df
1 file changed
src/seclab_taskflows/mcp_servers/gh_file_viewer.py
@@ -9,6 +9,7 @@
9
import os
10
from sqlalchemy.orm import DeclarativeBase, mapped_column, Mapped
11
from sqlalchemy import create_engine
12
+import sqlalchemy.exc
13
from sqlalchemy.orm import Session
14
from typing import Optional
15
from pathlib import Path
@@ -56,8 +57,8 @@ def __repr__(self):
56
57
58
try:
59
Base.metadata.create_all(engine, tables=[SearchResults.__table__])
-except Exception as e:
60
- logging.exception(f"Database already exists") # only log here, as this error likely only happens in test
+except sqlalchemy.exc.OperationalError as e:
61
+ logging.exception(f"Database/Tables already exist(s)") # only log here, as this error likely only happens in test
62
63
64
async def call_api(url: str, params: dict) -> str:
0 commit comments