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

why can't expMonth and expYear be number instead of bigint ? #48

Closed
rawatnaresh opened this issue Jul 14, 2021 · 1 comment
Closed

why can't expMonth and expYear be number instead of bigint ? #48

rawatnaresh opened this issue Jul 14, 2021 · 1 comment
Labels
BigInt Conflicts arising from 64 bit ints

Comments

@rawatnaresh
Copy link

All I'm trying to do it return the response from cardsApi

const data = await cardsApi.createCard({
    ...
});
...
return res.status(200).json({ card: data.result.card });

But I'm getting an error because expMonth and expYear are bigint

Screen Shot 2021-07-14 at 12 26 09

@wolfadex
Copy link
Contributor

Hi @rawatnaresh I can definitely see this being an issue. The short answer is because those fields are 64 bit Integers (see here in the docs). I will see what I can do to make this a better experience.

For a more immediate solution I'd recommend checking out #24 (comment) as it notes the more general issue of values that are BigInt and how to handle sending them over http.

@wolfadex wolfadex added the BigInt Conflicts arising from 64 bit ints label Feb 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BigInt Conflicts arising from 64 bit ints
Projects
None yet
Development

No branches or pull requests

3 participants