[CHORE] E722 bare exception fix (#1871)

* [CHORE] E722 bare exception fix
remove all bare exceptions from codebase and change it in `.flake8`
This commit is contained in:
dni ⚡
2023-08-16 12:17:54 +02:00
committed by GitHub
parent 3aef1605be
commit 355806608b
24 changed files with 48 additions and 50 deletions
+2 -2
View File
@@ -34,7 +34,7 @@ async def api_auditor():
"node_balance_msats": int(node_balance),
"lnbits_balance_msats": int(total_balance),
}
except:
except Exception:
raise HTTPException(
status_code=HTTPStatus.INTERNAL_SERVER_ERROR,
detail="Could not audit balance.",
@@ -94,7 +94,7 @@ async def api_topup_balance(
) -> dict[str, str]:
try:
await get_wallet(id)
except:
except Exception:
raise HTTPException(
status_code=HTTPStatus.FORBIDDEN, detail="wallet does not exist."
)