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

segment status is set to fault when in function addError() ? #538

Closed
wangzlei opened this issue Oct 1, 2022 · 1 comment
Closed

segment status is set to fault when in function addError() ? #538

wangzlei opened this issue Oct 1, 2022 · 1 comment

Comments

@wangzlei
Copy link
Contributor

wangzlei commented Oct 1, 2022

Need to investigate this code is typo or not:
https://github.com/aws/aws-xray-sdk-node/blob/master/packages/core/lib/segments/segment.js#L268-L275

@willarmiros
Copy link
Contributor

It is not a typo, just unfortunate naming :)

We have an equivalent method called addException in other SDKs to document a runtime exception's stacktrace. They all set fault flag. But in JS, there is no concept of Exceptions, JS only has Errors. So the method is the same as addException, but confusingly named addError.

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

No branches or pull requests

2 participants