mirror of
https://github.com/lnbits/lnbits-legend.git
synced 2024-11-20 10:39:59 +01:00
Merge branch 'FastAPI' of https://github.com/arcbtc/lnbits into FastAPI
This commit is contained in:
commit
4120a51e0c
@ -65,7 +65,7 @@ def create_app(config_object="lnbits.settings") -> FastAPI:
|
||||
register_routes(app)
|
||||
# register_commands(app)
|
||||
register_async_tasks(app)
|
||||
# register_exception_handlers(app)
|
||||
register_exception_handlers(app)
|
||||
|
||||
return app
|
||||
|
||||
@ -150,11 +150,11 @@ def register_async_tasks(app):
|
||||
async def stop_listeners():
|
||||
pass
|
||||
|
||||
def register_exception_handlers(app):
|
||||
@app.errorhandler(Exception)
|
||||
def register_exception_handlers(app: FastAPI):
|
||||
@app.exception_handler(Exception)
|
||||
async def basic_error(request: Request, err):
|
||||
print("handled error", traceback.format_exc())
|
||||
etype, value, tb = sys.exc_info()
|
||||
etype, _, tb = sys.exc_info()
|
||||
traceback.print_exception(etype, err, tb)
|
||||
exc = traceback.format_exc()
|
||||
return template_renderer().TemplateResponse("error.html", {"request": request, "err": err})
|
||||
|
@ -1,51 +1,48 @@
|
||||
aiofiles==0.6.0
|
||||
async-generator==1.10
|
||||
attrs==20.3.0
|
||||
aiofiles==0.7.0
|
||||
anyio==3.3.1
|
||||
asgiref==3.4.1
|
||||
asyncio==3.4.3
|
||||
attrs==21.2.0
|
||||
bech32==1.2.0
|
||||
bitstring==3.1.7
|
||||
blinker==1.4
|
||||
brotli==1.0.9
|
||||
cerberus==1.3.3
|
||||
certifi==2020.12.5
|
||||
click==7.1.2
|
||||
ecdsa==0.16.1
|
||||
embit==0.2.1
|
||||
environs==9.3.2
|
||||
bitstring==3.1.9
|
||||
cerberus==1.3.4
|
||||
certifi==2021.5.30
|
||||
charset-normalizer==2.0.6
|
||||
click==8.0.1
|
||||
ecdsa==0.17.0
|
||||
embit==0.4.9
|
||||
environs==9.3.3
|
||||
fastapi==0.68.1
|
||||
h11==0.12.0
|
||||
h2==4.0.0
|
||||
hpack==4.0.0
|
||||
httpcore==0.12.3
|
||||
httpx==0.17.1
|
||||
hypercorn==0.11.2
|
||||
hyperframe==6.0.0
|
||||
idna==3.1
|
||||
itsdangerous==1.1.0
|
||||
jinja2==2.11.3
|
||||
httpcore==0.13.7
|
||||
httptools==0.2.0
|
||||
httpx==0.19.0
|
||||
idna==3.2
|
||||
importlib-metadata==4.8.1
|
||||
jinja2==3.0.1
|
||||
lnurl==0.3.6
|
||||
markupsafe==1.1.1
|
||||
marshmallow==3.11.1
|
||||
markupsafe==2.0.1
|
||||
marshmallow==3.13.0
|
||||
outcome==1.1.0
|
||||
priority==1.3.0
|
||||
pydantic==1.8.1
|
||||
pyngrok==5.0.5
|
||||
pypng==0.0.20
|
||||
psycopg2-binary==2.9.1
|
||||
pydantic==1.8.2
|
||||
pypng==0.0.21
|
||||
pyqrcode==1.2.1
|
||||
pyscss==1.3.7
|
||||
python-dotenv==0.17.0
|
||||
quart==0.14.1
|
||||
quart-compress==0.2.1
|
||||
quart-cors==0.4.0
|
||||
quart-trio==0.7.0
|
||||
python-dotenv==0.19.0
|
||||
pyyaml==5.4.1
|
||||
represent==1.6.0.post0
|
||||
rfc3986==1.4.0
|
||||
rfc3986==1.5.0
|
||||
shortuuid==1.0.1
|
||||
six==1.15.0
|
||||
six==1.16.0
|
||||
sniffio==1.2.0
|
||||
sortedcontainers==2.3.0
|
||||
sqlalchemy==1.3.23
|
||||
sqlalchemy-aio==0.16.0
|
||||
toml==0.10.2
|
||||
trio==0.16.0
|
||||
typing-extensions==3.7.4.3
|
||||
werkzeug==1.0.1
|
||||
wsproto==1.0.0
|
||||
sse-starlette==0.6.2
|
||||
starlette==0.14.2
|
||||
typing-extensions==3.10.0.2
|
||||
uvicorn==0.15.0
|
||||
uvloop==0.16.0
|
||||
watchgod==0.7
|
||||
websockets==10.0
|
||||
zipp==3.5.0
|
||||
|
Loading…
Reference in New Issue
Block a user