`401` response to pushes causes lots of unnecessary retries

The response here and throughout that controller is an incorrect HTTP code - Create and other operations aren't Unauthorized, they're not supported by the instance. The code should be 422 Unprocessable Content or 405 Method Not Allowed

Since a 401 is returned, Mastodon & i imagine plenty of other fedi software will continue to retry to send operations that the instance doesn't support rather than bailing - see the DeliveryWorker and its check for status codes that stop retries and note how 401 is excluded.

This usually happens when someone will tag a birdsite.live account because it looks like a real account, and it gets especially out of hand when that account keeps getting included in replies, by default the instance tries to deliver each message 16 times, and additional deliveries are attempted if posts are deleted or edited.

I think simply changing the error code from 401 in that controller would save you and anyone else running this a decent chunk of resources at no cost - I don't think it's the correct code anywhere in that file: all of these should probably be a 500 or 501, depending on whether the cause of the failure is some as yet implemented feature or some unaccounted for error. idrc about those tho, it's really the 401 for Create that's causing most of the unnecessary traffic <3

Assigned to
6 months ago
6 months ago
No labels applied.