If your user object has circular references, the res.json can fail. You can stringify the response before sending it over amd chose properties. something like
In your Project Go to Models Folder and then in
More questions with similar tag
Version and environment information:
Steps to reproduce the problem:
How do I fix maximum call stack size exceeded?
How to fix: "RangeError: Maximum call stack size exceeded".
Avoid creating infinite loops by including a way to exit the loop. ... .
Avoid creating deeply nested recursive functions by including a way to exit the recursion. ... .
Avoid creating deeply nested recursive functions by using an iterative approach instead..
What is RangeError maximum call stack size exceeded?
Dealing with the “Maximum call stack size exceeded” error is easy. All you have to do is avoid using the spread operator or apply() function. For example, you could iterate over all array elements and call push() on each of them, as below: This will populate array2 as desired.
What is maximum stack exceeded?