You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have identified that the error is occurring during the serialization process within Axios, specifically in the stringifySafely function. The error message is as follows:
RequesFromCode.js?t=1709818947597:31 TypeError: Do not know how to serialize a BigInt
at stringify (<anonymous>)
at stringifySafely (axios.js?v=a7e38bec:812:37)
at Object.transformRequest (axios.js?v=a7e38bec:854:14)
at transform (axios.js?v=a7e38bec:1176:15)
at Object.forEach (axios.js?v=a7e38bec:74:10)
at Object.transformData (axios.js?v=a7e38bec:1175:17)
at Axios.dispatchRequest (axios.js?v=a7e38bec:1582:31)
at Axios._request (axios.js?v=a7e38bec:1872:33)
at Axios.request (axios.js?v=a7e38bec:1776:25)
at wrap (axios.js?v=a7e38bec:8:15)
at Axios.request (axios.js?v=a7e38bec:1780:41)
at async index.jsx:45:24
Debugging Efforts
As part of my debugging efforts, I have developed custom parser and encoder functions designed to handle BigInts during JSON data parsing. However, I am struggling to integrate these custom functions with Axios.
Custom Functions
Here is a simplified version of the custom functions:
I believe integrating these custom functions with Axios is crucial in resolving the BigInt serialization issue. Any guidance or suggestions on the best approach to achieve this would be highly appreciated.
The text was updated successfully, but these errors were encountered:
kartik-gupta-ij
changed the title
How to send BigInt in json body
Configure Axios to utilize these parser and encoder functions within the stringifySafely function
Mar 7, 2024
Describe the issue
I have identified that the error is occurring during the serialization process within Axios, specifically in the
stringifySafely
function. The error message is as follows:Debugging Efforts
As part of my debugging efforts, I have developed custom parser and encoder functions designed to handle BigInts during JSON data parsing. However, I am struggling to integrate these custom functions with Axios.
Custom Functions
Here is a simplified version of the custom functions:
Question
My primary question is: How can I properly configure Axios to utilize these custom parser and encoder functions within the
stringifySafely
function?Function link
Additional Information
I believe integrating these custom functions with Axios is crucial in resolving the BigInt serialization issue. Any guidance or suggestions on the best approach to achieve this would be highly appreciated.
Thank you in advance for your assistance.
Example Code
Expected behavior
status: 200
Axios Version
1.6.7
Adapter Version
No response
Browser
chrome
Browser Version
Latest
Node.js Version
21
The text was updated successfully, but these errors were encountered: