at this moment, dynamo-types can't show error message correctly.
expected error message or stack trace is like below:
but actual error message that we got:
when table tries to log table instance if something went wrong during writing item, we call JSON.stringify to get JSON.
In theory, JSON.stringify traverses entire object (think tree structure), so if any leaf node has circular reference, process cannot to be ended. and that's why JSON.stringify throws circular reference error.
anyway we can prevent this error by logging attributes only, so i've applied that workaround
well would be nicer if we can kinda start working on using proper logger. it's lame to use console.log on production code in year 2018
but that's another story. as of this change it seems good
at this moment, dynamo-types can't show error message correctly.
expected error message or stack trace is like below:
but actual error message that we got:
when table tries to log table instance if something went wrong during writing item, we call
JSON.stringify
to get JSON.In theory,
JSON.stringify
traverses entire object (think tree structure), so if any leaf node has circular reference, process cannot to be ended. and that's whyJSON.stringify
throws circular reference error.anyway we can prevent this error by logging attributes only, so i've applied that workaround