Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception.js does not handle Circular references #167

Closed
marcoancona opened this issue Mar 17, 2017 · 1 comment
Closed

Exception.js does not handle Circular references #167

marcoancona opened this issue Mar 17, 2017 · 1 comment
Assignees
Labels
Milestone

Comments

@marcoancona
Copy link
Contributor

marcoancona commented Mar 17, 2017

Sometimes trying to print an exception raises another exception:

Unhandled rejection TypeError: Converting circular structure to JSON
    at JSON.stringify (<anonymous>)
    at ServiceResponseException.Exception.toString (/home/node_modules/ews-javascript-api/js/Exceptions/Exception.js:42:21)
    at StringPrettyPrinter.PrettyPrinter.format (/home/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:1768:31)

Using json3 might be the easiest way to workaround this.

@gautamsi
Copy link
Owner

I will fix this later, meanwhile you can fix by modifying toString method to return stack property rather than performing json.stringify

@gautamsi gautamsi self-assigned this Apr 13, 2017
@gautamsi gautamsi added the bug label Apr 13, 2017
@gautamsi gautamsi added this to the 0.9.0 milestone Apr 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants