Skip to content

Retry against Porkbun API errors#15

Open
anpandey wants to merge 2 commits intoRLado:masterfrom
anpandey:retry
Open

Retry against Porkbun API errors#15
anpandey wants to merge 2 commits intoRLado:masterfrom
anpandey:retry

Conversation

@anpandey
Copy link

@anpandey anpandey commented Aug 8, 2025

I'd been getting some weird responses from the Porkbun API as described in #12 which would sometimes lead to Oink exiting with failure and my domains not getting updated. This adds a naive backoff for those POST requests and also makes sure that we don't try to parse a 503's response as JSON (which would give a confusing error as in #12 (comment)).

I've been running these changes for a few months without issue, and at least from my logs all of the 503s returned by Porkbun's API were eventually successful.

Adds a naive expontential backoff (along with logging in case of failure) for
some POST requests. Parameters are configurable, but the retry interval starts
at 2 seconds for the requests we send.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant