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

Add catch and additional logging. #1086 #1087

Merged
merged 7 commits into from
Sep 6, 2019
Merged

Add catch and additional logging. #1086 #1087

merged 7 commits into from
Sep 6, 2019

Conversation

kmcrawford
Copy link
Member

Attempt to catch error and log. Any other method of logging would be preferred.

closes #1086

Copy link
Member

@matteofigus matteofigus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I understand, if we are trying to handle the circular dependency scenario, can we reproduce with a test?

I think it should be enough to have this in a form like

const result = {test:true};
result.circular = result;
...
res.status(200).json(result);

src/registry/routes/components.js Outdated Show resolved Hide resolved
@matteofigus
Copy link
Member

@kmcrawford I made a PR to this branch to integrate the tests. Have a look 👍

Circular json handler - tests and improvements
@matteofigus matteofigus merged commit 19e64fa into master Sep 6, 2019
@matteofigus matteofigus deleted the circular-json branch September 6, 2019 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

UnhandledPromiseRejectionWarning: TypeError: Converting circular structure to JSON
2 participants