skip raising a KeyError on missing actor
This commit is contained in:
parent
4bdd2b031b
commit
ec325f9f08
|
@ -82,11 +82,8 @@ async def inbox(request):
|
||||||
try:
|
try:
|
||||||
data = await request.json(loads=Message.new_from_json)
|
data = await request.json(loads=Message.new_from_json)
|
||||||
|
|
||||||
if 'actor' not in data:
|
|
||||||
raise KeyError('actor')
|
|
||||||
|
|
||||||
## reject if there is no actor in the message
|
## reject if there is no actor in the message
|
||||||
except KeyError:
|
if 'actor' not in data:
|
||||||
logging.verbose('actor not in data')
|
logging.verbose('actor not in data')
|
||||||
return Response.new_error(400, 'no actor in message', 'json')
|
return Response.new_error(400, 'no actor in message', 'json')
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue