From 4458594f04f3038f16933f872cd5684df8a58dd1 Mon Sep 17 00:00:00 2001 From: Andrew Godwin Date: Fri, 7 Jul 2023 16:32:57 -0600 Subject: [PATCH] Also capture JSON-LD errors --- users/models/inbox_message.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/users/models/inbox_message.py b/users/models/inbox_message.py index fe8963b..155484a 100644 --- a/users/models/inbox_message.py +++ b/users/models/inbox_message.py @@ -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