From f408e84af330ff89b4f83f95b8ef2a5e8f268520 Mon Sep 17 00:00:00 2001 From: Amritanshu Date: Mon, 6 Mar 2023 10:21:27 +0530 Subject: [PATCH] Added traceback to save voucher to better understand why an error occurs. --- barker/barker/routers/voucher/save.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/barker/barker/routers/voucher/save.py b/barker/barker/routers/voucher/save.py index ceefea0..bb864f7 100644 --- a/barker/barker/routers/voucher/save.py +++ b/barker/barker/routers/voucher/save.py @@ -1,3 +1,4 @@ +import traceback import uuid from datetime import datetime, timedelta @@ -61,6 +62,7 @@ def save( if item.voucher_type != VoucherType.KOT: print_bill(voucher_id, db) except SQLAlchemyError as e: + traceback.print_exc() raise HTTPException( status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, detail=str(e),