test form data for POST

This commit is contained in:
Jakub Miazek
2024-11-11 15:10:05 +01:00
parent 51c20c28eb
commit 34ab82fb4c
4 changed files with 20 additions and 4 deletions

View File

@@ -27,4 +27,8 @@ AsyncSessionFactory = async_sessionmaker(
async def get_db() -> AsyncGenerator:
async with AsyncSessionFactory() as session:
# logger.debug(f"ASYNC Pool: {engine.pool.status()}")
yield session
try:
yield session
except Exception as e:
logger.error(f"Error getting database session: {e}")
raise