From a1eb570b67cb9e84d37f7a2d1b65874aa1ddeaec Mon Sep 17 00:00:00 2001 From: decentral1se Date: Wed, 16 Jun 2021 11:32:14 +0200 Subject: [PATCH] Don't explode so much while testing --- pubspace.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pubspace.py b/pubspace.py index 98e31d9..d21131b 100644 --- a/pubspace.py +++ b/pubspace.py @@ -37,7 +37,10 @@ mastodon.stream_hashtag("pubspace", PubspaceListener(), run_async=True) @app.get("/") async def home(request: Request): - app.state.log.info(await request.json()) + try: + app.state.log.info(await request.json()) + except Exception: + return {} @app.get("/healthz")