TypeError: Converting circular structure to JSON --> starting at object with constructor 'Socket' | property 'parser' -> object with constructor 'HTTPParser' --- property 'socket' closes the circle at JSON.stringify (<anonymous>) code example
Example 1: UnhandledPromiseRejectionWarning: TypeError: Converting circular structure to JSON
I also ran into this issue. It was because I forgot to await for a promise.
Example 2: Converting circular structure to JSON
//The error means that the object you pass in the request has a circular reference, something like:
var a = {};
a.b = a;