mirror of
https://github.com/jointakahe/takahe.git
synced 2024-11-22 07:10:59 +00:00
Also capture JSON-LD errors
This commit is contained in:
parent
c93a27e418
commit
4458594f04
1 changed files with 2 additions and 1 deletions
|
@ -1,4 +1,5 @@
|
|||
from django.db import models
|
||||
from pyld.jsonld import JsonLdError
|
||||
|
||||
from core.exceptions import ActivityPubError
|
||||
from stator.models import State, StateField, StateGraph, StatorModel
|
||||
|
@ -155,7 +156,7 @@ class InboxMessageStates(StateGraph):
|
|||
case unknown:
|
||||
raise ValueError(f"Cannot handle activity of type {unknown}")
|
||||
return cls.processed
|
||||
except ActivityPubError:
|
||||
except (ActivityPubError, JsonLdError):
|
||||
return cls.errored
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue