Verified Commit f0ef9ea5 authored by Eliot Berriot's avatar Eliot Berriot
Browse files

Better error handling during scan

parent ea27dd91
......@@ -96,5 +96,10 @@ def get_library_data(library_url):
serializer = serializers.PaginatedCollectionSerializer(
data=response.json(),
)
serializer.is_valid(raise_exception=True)
if not serializer.is_valid():
return {
'errors': [
'Invalid ActivityPub response from remote library']
}
return serializer.validated_data
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment