Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JS: IdempotencyKey, default to empty string #273

Merged
merged 1 commit into from
Mar 2, 2022
Merged

Conversation

svix-frank
Copy link
Contributor

@svix-frank svix-frank commented Mar 2, 2022

The JS templates erroneously sets the IdempotencyKey to literal string undefined if idempotencyKey is undefined. This is extremely bad behavior, a quick fix is to set it to "" which is ignored by the API. I will follow up with a fix to the templates shortly.

@svix-frank svix-frank requested a review from a team March 2, 2022 23:33
@svix-frank svix-frank merged commit ef58e40 into main Mar 2, 2022
@svix-frank svix-frank deleted the frank/idem-fix branch March 2, 2022 23:43
svix-frank added a commit that referenced this pull request Mar 3, 2022
svix-frank added a commit that referenced this pull request Mar 3, 2022
…ined (#277)

This is a follow up to #273, #273 was a hotfix to set the idempotency key to an empty string if not set which works with our current server implementation but is way to fragile. This updates the generator templates to properly ignore undefined fields.
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