mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-12-16 21:26:33 +00:00
Loudly throw errors in inbox task
This commit is contained in:
parent
45926eed34
commit
6617cede37
1 changed files with 2 additions and 9 deletions
|
@ -58,18 +58,11 @@ class Inbox(View):
|
||||||
def activity_task(activity_json):
|
def activity_task(activity_json):
|
||||||
""" do something with this json we think is legit """
|
""" do something with this json we think is legit """
|
||||||
# lets see if the activitypub module can make sense of this json
|
# lets see if the activitypub module can make sense of this json
|
||||||
try:
|
activity = activitypub.parse(activity_json)
|
||||||
activity = activitypub.parse(activity_json)
|
|
||||||
except activitypub.ActivitySerializerError:
|
|
||||||
return
|
|
||||||
|
|
||||||
# cool that worked, now we should do the action described by the type
|
# cool that worked, now we should do the action described by the type
|
||||||
# (create, update, delete, etc)
|
# (create, update, delete, etc)
|
||||||
try:
|
activity.action()
|
||||||
activity.action()
|
|
||||||
except activitypub.ActivitySerializerError:
|
|
||||||
# this is raised if the activity is discarded
|
|
||||||
return
|
|
||||||
|
|
||||||
|
|
||||||
def has_valid_signature(request, activity):
|
def has_valid_signature(request, activity):
|
||||||
|
|
Loading…
Reference in a new issue