jointakahe / takahe

An ActivityPub/Fediverse server
BSD 3-Clause "New" or "Revised" License
1.12k stars 86 forks source link

separate out timeouts from other remote server issues #645

Closed osmaa closed 1 year ago

osmaa commented 1 year ago

Another relatively large group of errors in my sentry are remote fetches for webfinger or pinned posts from slow servers. Raising a TryAgain instead of a fatal error fixes majority of these - however, one can't ensure a canonical actor URI is known until webfinger has been successful.

osmaa commented 1 year ago

mock featured posts added to the test, though the test coverage isn't quite as deep as I would have liked. Also added handling of TryAgainLater to users/views/activitypub.py. Did not move the exception from stator to core, that probably would be advisable?

andrewgodwin commented 1 year ago

I'm trying to keep Stator separate almost like a library in case I spin it out, so I do want to keep TryAgainLater in there as it's part of its direct runtime behaviour.

Thanks for this!