Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Throw UnrecoverableMessageHandlingException on 4xx #1235

Merged
merged 2 commits into from
Nov 24, 2024

Conversation

BentiGorlich
Copy link
Member

When we try to deliver an activity to an inbox and receive a 4xx status code other than the 429 for rate limiting we now discard that message, so it will not get retried. This also doesn't count as a failed delivery to the instance anymore, because the instance is up, it just didn't accept the activity. TransportExceptions are now caught as well, since those are the ones we get when an instance is down

@BentiGorlich BentiGorlich added bug Something isn't working activitypub ActivityPub related issues backend Backend related issues and pull requests labels Nov 22, 2024
@BentiGorlich BentiGorlich self-assigned this Nov 22, 2024
@melroy89 melroy89 added this to the v1.7.3 milestone Nov 22, 2024
@melroy89 melroy89 changed the title Throw UnrecoverableMessageHandlingException on 4xx Throw UnrecoverableMessageHandlingException on 4xx and > 500 Nov 22, 2024
@melroy89 melroy89 changed the title Throw UnrecoverableMessageHandlingException on 4xx and > 500 Throw UnrecoverableMessageHandlingException on 4xx Nov 22, 2024
@melroy89 melroy89 modified the milestones: v1.7.3, v1.7.4 Nov 23, 2024
When we try to deliver an activity to an inbox and receive a 4xx status code other than the 429 for rate limiting we now discard that message, so it will not get retried. This also doesn't count as a failed delivery to the instance anymore, because the instance is up, it just didn't accept the activity. TransportExceptions are now caught as well, since those are the ones we get when an instance is down
- The log part will is already partly covered by the  `ApHttpClient::logRequestException` method, but it will be helpful regardless
- use a constant for the 429 rate limited http status code
@BentiGorlich BentiGorlich force-pushed the fix/delivery-retry-on-post-failure branch from e7a5a53 to d5760b6 Compare November 24, 2024 11:33
@BentiGorlich BentiGorlich merged commit 9538dda into main Nov 24, 2024
7 checks passed
@BentiGorlich BentiGorlich deleted the fix/delivery-retry-on-post-failure branch November 24, 2024 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
activitypub ActivityPub related issues backend Backend related issues and pull requests bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants