Harden curl retries for Porkbun API calls #1

Open
Kacper wants to merge 1 commit from fix-curl-http-error-retries into main
Owner

This hardens the DDNS updater against transient Porkbun/API HTTP failures.

Context:

  • A Porkbun retrieve call can return a transient 503 HTML body before a retry succeeds.
  • Because the script captures stdout/stderr for JSON parsing, that can concatenate HTML with the later JSON response and make jq reject the payload.

Change:

  • Adds shared curl retry flags with --fail --show-error --silent --retry 3 --retry-delay 2.
  • Applies those flags to Porkbun API calls and public-IP fallback calls.

Validation:

  • bash -n updateDNS.sh
  • git diff --check
This hardens the DDNS updater against transient Porkbun/API HTTP failures. Context: - A Porkbun retrieve call can return a transient 503 HTML body before a retry succeeds. - Because the script captures stdout/stderr for JSON parsing, that can concatenate HTML with the later JSON response and make `jq` reject the payload. Change: - Adds shared curl retry flags with `--fail --show-error --silent --retry 3 --retry-delay 2`. - Applies those flags to Porkbun API calls and public-IP fallback calls. Validation: - `bash -n updateDNS.sh` - `git diff --check`
Kacper added 1 commit 2026-04-15 01:43:06 +00:00
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin fix-curl-http-error-retries:fix-curl-http-error-retries
git checkout fix-curl-http-error-retries

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git checkout main
git merge --no-ff fix-curl-http-error-retries
git checkout fix-curl-http-error-retries
git rebase main
git checkout main
git merge --ff-only fix-curl-http-error-retries
git checkout fix-curl-http-error-retries
git rebase main
git checkout main
git merge --no-ff fix-curl-http-error-retries
git checkout main
git merge --squash fix-curl-http-error-retries
git checkout main
git merge --ff-only fix-curl-http-error-retries
git checkout main
git merge fix-curl-http-error-retries
git push origin main
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Amargius_Commons/porkbun_ddns_script#1
No description provided.