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

RequestOptions with deprecated key are mutated without removing the old key #1029

Closed
sktt opened this issue Oct 8, 2020 · 2 comments · Fixed by #1041
Closed

RequestOptions with deprecated key are mutated without removing the old key #1029

sktt opened this issue Oct 8, 2020 · 2 comments · Fixed by #1041
Assignees

Comments

@sktt
Copy link

sktt commented Oct 8, 2020

The follow code will throw an exception with

Error: Both 'stripeAccount' and 'stripe_account' were provided; please remove 'stripe_account', which is deprecated.
const opts = {stripe_account: "acct_...." }
const invoice = await stripe.finalizeInvoice(invoiceId, opts)
// here opts = {stripe_account: "acct_...", stripeAccount: "acct_..." }
await stripe.paymentIntents.confirm(invoice.payment_intent.id, opts)

Cheers

@richardm-stripe
Copy link
Contributor

Thank you @sktt for reporting this. I agree, ideally opts shouldn't be mutated at all. We're investigating a fix.

@richardm-stripe
Copy link
Contributor

Hi @sktt the fix for this is out in 8.112.0, thank you again for reporting.

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 a pull request may close this issue.

3 participants