[perf] add some exception message
This commit is contained in:
parent
964159a133
commit
789cd3f44c
1 changed files with 11 additions and 3 deletions
14
app/main.py
14
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")
|
||||
|
|
Loading…
Reference in a new issue