wip: uvicorn logging conf to json

This commit is contained in:
Jakub Miazek
2024-08-17 10:45:51 +02:00
parent a58e98c4b1
commit 6f0b097d2d
9 changed files with 166 additions and 57 deletions

View File

@@ -21,6 +21,7 @@ async def create_multi_stuff(
db_session.add_all(stuff_instances)
await db_session.commit()
except SQLAlchemyError as ex:
logger.error(f"Error inserting instances of Stuff: {repr(ex)}")
raise HTTPException(
status_code=status.HTTP_422_UNPROCESSABLE_ENTITY, detail=repr(ex)
) from ex