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

🐛[jsonStringify] do not crash on serialization error #242

Merged
merged 1 commit into from
Jan 24, 2020

Conversation

bcaudan
Copy link
Contributor

@bcaudan bcaudan commented Jan 24, 2020

fixes #236

@bcaudan bcaudan requested a review from a team as a code owner January 24, 2020 15:12
@BenoitZugmeyer
Copy link
Member

If I understand correctly, when doing DD_LOGS.logger.info('hello', window) the logs intake will receive "<error: unable to serialize object>" instead of an object. I think it would be better to not send anything in this case.

@bcaudan
Copy link
Contributor Author

bcaudan commented Jan 24, 2020

If I understand correctly, when doing DD_LOGS.logger.info('hello', window) the logs intake will receive "<error: unable to serialize object>" instead of an object.

Yes

I think it would be better to not send anything in this case.

IMLO, swallowing the error could be quite frustrating for the user. With this approach, the user see that one of his log as been triggered and can try to understand which one is the culprit.

@BenoitZugmeyer
Copy link
Member

All right I didn't know the logs intake could take a simple string as input.

@bcaudan bcaudan merged commit e2ead99 into master Jan 24, 2020
@bcaudan bcaudan deleted the bcaudan/json-circular branch January 24, 2020 15:50
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.

Uncaught TypeError: Converting circular structure to JSON
2 participants