-
-
Notifications
You must be signed in to change notification settings - Fork 115
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
Converting circular structure to JSON #339
Comments
From the console.log, it looks like everything is fine. I assume you're using Collection2 as well? From a quick shell test using:
I got no error in the shell and this in the console:
|
Yes, I do use collection2. The When I remove the try... catch... from your example. So |
Most likely the culprit is this in collection2: https://github.com/aldeed/meteor-collection2/blob/master/package/collection2/collection2.js#L503-L505 This is done for use in Meteor methods, which will return only the sanitized error to the client. Or perhaps For Apollo, you could probably add a custom error formatter function that returns |
I'm trying to do a
JSON.stringify
on an error thrown by simpl-schema and I get the following error:Any idea why this is and how to fix it?
This is a simplified scenario to illustrate the issue. It actually happens implicitly when an error in an Apollo resolver is caused by simpl-schema :(
This is the schema:
This is the code:
This is the console log:
The text was updated successfully, but these errors were encountered: