Skip to content

WARN level logging when text/fallback is missing in chat.* API method calls #1249

@erkand-imeri

Description

@erkand-imeri

Hello, i am currently using Node.js with TypeScript with slack-bolt.

"@slack/bolt": "^3.4.0",

And keep getting this WARN logs in DataDog, it's weird because in chat.postMessage i do have the text argument.

The second log is related to fallback argument, i didn't see this argument in the Slack API documentation, though i tried adding it, but this warning still comes up.

[WARN] bolt-app The text argument is missing in the request payload for a chat.postMessage call - It's a best practice to always provide a text argument when posting a message. The text is used in places where the content cannot be rendered such as: system push notifications, assistive technology such as screen readers, etc.

[WARN] bolt-app The fallback argument is missing in the request payload for a chat.postMessage call - It's a best practice to always provide a fallback argument when posting a message. The fallback is used in places where the content cannot be rendered such as: system push notifications, assistive technology such as screen readers, etc.
`

How can i fix this so the warnings don't show up?

Also, i would like to customize the logs, currently the WARN in Datadog is labelled with red color and treated as an error log, i would like to colorize it as yellow, probably add my custom logger (winston/bunyan) to log this? How can i achieve this in slack-bolt?

Thanks in advance.

Metadata

Metadata

Assignees

Labels

questionM-T: User needs support to use the project

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions