-
Notifications
You must be signed in to change notification settings - Fork 751
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
[Deno] Invalid JSON received from the Stripe API #1519
Comments
Thanks for the report @thorwebdev and sorry you're having issues! I'm able to reproduce this as well. Going to investigate and report back! |
For some reason the response for these calls when issued from Deno is actually returning a 400 without the usual JSON content:
This causes the error handler to throw. I don't have the same behavior in Node. |
This seems to be caused specifically due to sending |
This is reproducible with:
This throws an error and seems to be Deno specific. If I try to do this with the Node 18+ fetch implementation, there is no error. Sending the header is appropriate as per the spec:
|
The root cause issue here is Deno injects its own Content-Length header despite I'll investigate to see if we can fix this from the Stripe side in the interim. |
Hi @thorwebdev - thanks for the patience here! I've released the fix under [email protected] . It now works for me. Could you try it out with your code just to double check, and if all works, I'll release it to the main stable channel? You can try this out using:
Thanks! |
@dcr-stripe I can confirm that |
This is now released as [email protected] (https://github.com/stripe/stripe-node/releases/tag/v10.5.0) - thanks for the patience here! |
Hi, I'm getting this error on deployment. It works great on local though. Node version : 14.17.0 |
Describe the bug
stripe.accounts.createLoginLink
throws error when executed in Deno environment.To Reproduce
Expected behavior
Request to execute successfully
Code snippets
OS
macOS 11.06.1
Node version
Deno version: { deno: "1.20.3", v8: "10.0.139.6", typescript: "4.6.2" }
Library version
https://esm.sh/[email protected]?target=deno&no-check
API version
2020-08-27
Additional context
Related discussion on StripeDev Discord
Potentially related to #954 ?
The text was updated successfully, but these errors were encountered: