fixes for vlad :)
This commit is contained in:
parent
f547b1f141
commit
e0d9f2d764
2 changed files with 5 additions and 2 deletions
|
|
@ -80,5 +80,6 @@ async def fetch_fiat_exchange_rate(currency: str, provider: str):
|
|||
else:
|
||||
data = {}
|
||||
getter = exchange_rate_providers[provider]["getter"]
|
||||
assert callable(getter), "cannot call getter function"
|
||||
if not callable(getter):
|
||||
return None
|
||||
return float(getter(data, replacements))
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
from http import HTTPStatus
|
||||
|
||||
from fastapi import Depends, Query
|
||||
from loguru import logger
|
||||
from starlette.exceptions import HTTPException
|
||||
|
||||
from lnbits.core.crud import get_user
|
||||
|
|
@ -132,7 +133,8 @@ async def api_subdomain_make_subdomain(domain_id, data: CreateSubdomain):
|
|||
await cloudflare_deletesubdomain(
|
||||
domain=domain, domain_id=res_json["result"]["id"]
|
||||
)
|
||||
except:
|
||||
except Exception as exc:
|
||||
logger.warning(exc)
|
||||
raise HTTPException(
|
||||
status_code=HTTPStatus.BAD_REQUEST,
|
||||
detail="Problem with cloudflare.",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue