Skip to content

retry: don't retry non-idempotent requests (POST) on 5xx #63

Open

Description

@timimsms

Problem

retryTransport (internal/api/retry.go) retries any request on a 5xx response or a retryable network error, whatever the HTTP method. For a POST, such as task create, comment add or bulk operations that create things, a 502 or 504 or a timeout after ClickUp has already handled the request means the retry creates the item a second time.

This behaviour predates #60, which kept it. It was found while reviewing #60.

Fix

  • Retry 5xx responses and network errors only for idempotent methods (GET, HEAD, OPTIONS, PUT, DELETE).
  • Keep retrying 429 for every method. ClickUp rejects a rate-limited request before processing it, so replaying it is safe.
  • Add tests: a POST that gets a 502 is attempted exactly once, and a POST that gets a 429 is retried.

🤖 Generated with Claude Code

Activity

  1. added
    bug
    on Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions