Skip to content

Server: honor HTTP-date Retry-After values for webhooks #525

Closed

Description

@piyusshhjangid

Problem

Webhook retries honor numeric Retry-After values, but ignore valid HTTP-date values and use the exponential backoff instead. Receivers using date-form values can therefore be retried earlier than requested.

Expected behavior

Parse both delay-seconds and HTTP-date values. For a date, calculate the delay from the current time and preserve the existing 10-second maximum. Missing or invalid values should continue using the existing exponential backoff.

Tests

  • Numeric and HTTP-date values produce the expected delays.
  • Past dates, invalid values, and missing headers follow the documented fallback behavior.
  • Delays remain capped at 10 seconds.

Document the supported formats and add an appropriate @chatcops/server changeset.

Activity

  1. piyusshhjangid commented on Oct 31, 2026

    @piyusshhjangid
    CollaboratorAuthor

    Hi @anurag629, if this issue makes sense, could you please add the appropriate label and assign it to me? I’d be happy to work on it after #524 0r #504 is merged.

  2. anurag629 commented on Oct 31, 2026

    @anurag629
    Member

    @piyusshhjangid confirmed: parseRetryAfter() (packages/server/src/webhook.ts:164-169) only reads delay-seconds, so an HTTP date like Wed, 21 Oct 2026 07:28:00 GMT falls through to the backoff. Date.parse on the header, minus now, clamped to MAX_RETRY_AFTER_MS, with a past date counting as 0, is the fix. It's held for you: you're at two with #477 and #519, so say here when one of them is merged. Do it after #524, since both touch the retry loop.

  3. anurag629 commented on Oct 31, 2026

    @anurag629
    Member

    @piyusshhjangid #524 and #504 are in, so this is yours now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

hacktoberfestGood pick for Hacktoberfest contributors

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions