Skip to content

test(js): Cover idempotency key reuse across POST retries#2401

Merged
svix-jplatte merged 1 commit into
svix:mainfrom
bharathkumar39293:test/js-post-retry-idempotency-key
Jun 24, 2026
Merged

test(js): Cover idempotency key reuse across POST retries#2401
svix-jplatte merged 1 commit into
svix:mainfrom
bharathkumar39293:test/js-post-retry-idempotency-key

Conversation

@bharathkumar39293

Copy link
Copy Markdown
Contributor

Summary

Adds regression coverage to ensure automatically generated idempotency keys are reused across POST retries.

Motivation

The JavaScript SDK automatically generates an idempotency key for POST requests when one is not provided by the caller.

Retries currently reuse the same request headers, meaning the same auto-generated idempotency key is preserved across retry attempts. This behavior is important for safe retry semantics and helps avoid duplicate side effects when a request is retried after a transient failure.

This test documents and protects that existing behavior.

Changes

  • Added a test covering POST retries with automatic idempotency key generation.
  • Verifies the same idempotency key is reused across all retry attempts.
  • No production code changes.

Test plan

cd javascript
npm test

@bharathkumar39293
bharathkumar39293 requested a review from a team June 23, 2026 04:45
@bharathkumar39293
bharathkumar39293 requested a review from a team as a code owner June 23, 2026 04:45

@svix-jplatte svix-jplatte left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@svix-jplatte svix-jplatte changed the title test(js): cover idempotency key reuse across POST retries test(js): Cover idempotency key reuse across POST retries Jun 24, 2026
@svix-jplatte
svix-jplatte merged commit 531d666 into svix:main Jun 24, 2026
26 checks passed
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.

2 participants