We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Slack will use JSON.stringify(value) to handle non-string value, so it would throw Circular Structure error when value having circular reference. https://github.com/slackapi/node-slack-sdk/blob/fb4bc6fe62e055581d342b8279350d59325930d3/lib/clients/helpers.js#L30
JSON.stringify(value)
value
It throws exception when passing request object from router of Express
request
node-logger/src/service/slack.js
Line 41 in c583a30
We can avoid it by passing value to a filter function likes:
import { forEach, isObject } from 'lodash'; function removeCircularStructure(object, set = new Set(), nextObject = {}) { forEach(object, (value, key) => { if (isObject(value)) { if (set.has(value)) { return; } set.add(value); nextObject[key] = removeCircularStructure(value, set); return; } nextObject[key] = value; }); return nextObject; }
Or do something else to prevent this error.
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Slack will use
JSON.stringify(value)
to handle non-stringvalue
,so it would throw Circular Structure error when
value
having circular reference.https://github.com/slackapi/node-slack-sdk/blob/fb4bc6fe62e055581d342b8279350d59325930d3/lib/clients/helpers.js#L30
It throws exception when passing
request
object from router of Expressnode-logger/src/service/slack.js
Line 41 in c583a30
We can avoid it by passing value to a filter function likes:
Or do something else to prevent this error.
The text was updated successfully, but these errors were encountered: