refactor: Improve exception handling and logging in authentication and playlist services; enhance code readability and structure
All checks were successful
Backend CI / lint (push) Successful in 9m21s
Backend CI / test (push) Successful in 4m18s

This commit is contained in:
JSC
2025-08-13 00:04:55 +02:00
parent f094fbf140
commit bee1076239
14 changed files with 144 additions and 66 deletions

View File

@@ -223,11 +223,11 @@ class CreditService:
user_id,
)
return transaction
except Exception:
await session.rollback()
raise
else:
return transaction
finally:
await session.close()
@@ -316,11 +316,11 @@ class CreditService:
user_id,
)
return transaction
except Exception:
await session.rollback()
raise
else:
return transaction
finally:
await session.close()
@@ -503,11 +503,11 @@ class CreditService:
user_id,
)
return transaction
except Exception:
await session.rollback()
raise
else:
return transaction
finally:
await session.close()