Skip to content

feat: improve ACME server errors management - #3360

Merged
ldez merged 5 commits into
go-acme:mainfrom
ldez:fix/retry-after
Nov 10, 2026
Merged

ldez merged 5 commits into
go-acme:mainfrom
ldez:fix/retry-after

Conversation

@ldez

@ldez ldez commented Nov 10, 2026 •

Copy link
Copy Markdown
Member

I removed the check on HTTP status code: lego with only check the type of the detail problem type.

Also, theoretically, several error types could have a Retry-After header value. (ex: https://github.com/letsencrypt/boulder/blob/047ca0bd6bd389efbc878f6304fcaa9e65bcb6b5/wfe2/wfe.go#L664-L666).

So, I added the field RetryAfter to the ProblemDetails error type.

But to avoid breaking changes the type RateLimitedError will keep a RetryAfter field.
The RetryAfter fields of the ProblemDetails and RateLimitedError will always have the same value.

As I don't know the response content when a 503 is used for rate limits error (as I explained inside the issue), I replaced the previous raw errors based on string with a ProblemDetails.

Theoretically, it should never happen because the ACME servers should follow the RFC8555, but I prefer to be safe and avoid unexpected behavior.

Fixes #3356

@ldez ldez added this to the unreleased-v5 milestone Nov 10, 2026
@ldez
ldez requested a review from dmke November 10, 2026 11:45
@dmke

dmke commented Nov 10, 2026

Copy link
Copy Markdown
Member

LGTM

@ldez
ldez merged commit 168b963 into go-acme:main Nov 10, 2026
13 checks passed
@ldez
ldez deleted the fix/retry-after branch November 10, 2026 19:42
@ldez ldez modified the milestones: unreleased-v5, v5.7 Nov 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

HTTP 503 Retry-After header is not exposed to library callers

2 participants