-
Notifications
You must be signed in to change notification settings - Fork 656
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
NodeError: The "last argument" argument must be of type function #533
Comments
@FrancescoPolitano thanks for bringing this to our attention. it looks like you are using the example from the in the meantime, the fix is to change the
|
Thank you! I have another problem, postmessage give me an error for circular structures on WebClient.ts line 528, but I don't know how to resolve circular dependency on your "value" structure |
@FrancescoPolitano the for example, an options parameter like the following would cause the same kind of error: const attachment = {
text: 'My attachment',
fields: [
{
title: 'Something',
value: attachment, // ERROR: this is a circular reference, JSON.stringify() will fail
},
],
};
web.chat.postMessage({
channel: 'C12345',
text: `Hello, world',
attachments: [attachment],
}).then(console.error); There's no good way to turn a circular reference into a JSON object to send to Slack. It's likely a bug in your code. Take a closer look and try to flatten the structure as much as possible. |
Thank you for your help and for your good code. |
Hi, I'm stuck with this problem while trying to send a message after an event call using the API.
When I try to call the postMessage function Node crashes and i get this:
NodeError: The "last argument" argument must be of type function
I'll really appreciate some hints.
The text was updated successfully, but these errors were encountered: