diff --git a/app/main.py b/app/main.py index 7915e3b..cdae47c 100644 --- a/app/main.py +++ b/app/main.py @@ -82,10 +82,18 @@ async def inbox( payload = await request.json() if httpsig_checker: - await save_incoming(db_session, payload) - return Response(status_code=202) + if await save_incoming(db_session, payload): + return Response(status_code=202) + else: + return Response( + status_code=406, + content="invalid activitypub object" + ) else: - return Response(status_code=406) + return Response( + status_code=406, + content="invalid http-sig" + ) @app.post("/outbox")