Improves error reporting on activitypub parser

This commit is contained in:
Mouse Reeve 2022-03-16 13:53:54 -07:00
parent f2b0b306e9
commit 819458e82a

View file

@ -65,7 +65,7 @@ class ActivityObject:
try:
value = kwargs[field.name]
if value in (None, MISSING, {}):
raise KeyError()
raise KeyError("Missing required field", field.name)
try:
is_subclass = issubclass(field.type, ActivityObject)
except TypeError: