I've got a login script that used to work in a project I'm resurecting. I've got everything compiling using newer tink_web from haxelib. However when rejecting a promise containing an OutgoingResponse I'm getting a node error at runtime.
TypeError: Converting circular structure to JSON
The OutgoingResponse that causes the error does indeed contain a circulare reference:
Hi,
I've got a login script that used to work in a project I'm resurecting. I've got everything compiling using newer tink_web from haxelib. However when rejecting a promise containing an OutgoingResponse I'm getting a node error at runtime.
TypeError: Converting circular structure to JSON
The OutgoingResponse that causes the error does indeed contain a circulare reference:
{ header: { statusCode: 200, reason: 'OK', protocol: 'HTTP/1.1', fields: [] }, body: { retainCount: 0, value: { value: [Object] } } }
There value referes to itself which looks to be the cause of the problem. My OutgoingResponse is created like this:
var failedResponse = new OutgoingResponse(new ResponseHeader(200, "OK", null), 'false');
Any ideas? Will try the success side of the Promise in the auth script to see if it's response suffers a similar fate ;)
Cheers, Tom.