Slack API · error code

Slack error no_text: No message text provided

Permanent - do not retryHTTP 200Message content & Block Kit

Last verified against Slack API reference - chat.postMessage errors

What Slack returns
No message text provided.

What error no_text means

Slack found nothing to post. The description is the shortest in the table — "No message text provided" — and it means the request carried neither usable text nor an alternative content payload the method accepts. chat.postMessage requires at least one of text, blocks, or attachments; send none (or send them empty) and this is the answer.

The interesting cases are the ones where you believe you sent text. An undefined or null interpolated by your templating engine can serialize to an empty string; a conditional that builds the message body can fall through to nothing on an unexpected input; a refactor that moved content into blocks may have left an empty text field while a serialization bug drops blocks entirely. Because the HTTP status is 200 and the error is quiet, these bugs often surface as "the bot skips some notifications" rather than as a visible failure.

Note that even when blocks carry the content, including a meaningful text value remains the documented best practice: it becomes the notification fallback shown in push/desktop notifications. Fixing no_text by adding real fallback text improves the product, not just the API call.

What it looks like

POST /api/chat.postMessage
{"channel": "C0123ABCDEF", "text": ""}

HTTP 200
{"ok": false, "error": "no_text"}

Why it happens

  • The text variable is empty, null, or undefined at send time (failed lookup, unexpected branch, template miss).
  • Content was moved to blocks but the blocks array is empty or dropped by serialization, leaving nothing at all.
  • A message builder returns an empty string for edge-case inputs (empty list, missing translation key).
  • Whitespace-only text after trimming or sanitization.

How to fix Slack error no_text

  1. 1Log the outgoing payload for failing sends; confirm what text/blocks/attachments actually contained.
  2. 2Guard the send: refuse (loudly) to call chat.postMessage when all content fields are empty, so the bug surfaces in your logs with a stack trace.
  3. 3Fix the upstream builder or template branch that produced empty content.
  4. 4When using blocks, still set text to a meaningful notification fallback string.

How to stop it recurring

Centralize message construction behind a function that validates non-empty content and a notification fallback before any network call, and unit-test the builder with the degenerate inputs (empty arrays, missing fields) that produce blank messages. Silent empty sends are a monitoring problem: alert on this error string specifically.

Official reference: Slack API reference - chat.postMessage errors. See all Slack error codes or the Slack limits and quotas.

Related codes

Error no_text - quick answers

What does Slack error no_text mean?

Slack found nothing to post. The description is the shortest in the table — "No message text provided" — and it means the request carried neither usable text nor an alternative content payload the method accepts. chat.postMessage requires at least one of text , blocks , or attachments ; send none (or send them empty) and this is the answer. The interesting cases are the ones where you believe you sent text.

How do I fix Slack error no_text?

1. Log the outgoing payload for failing sends; confirm what text/blocks/attachments actually contained. 2. Guard the send: refuse (loudly) to call chat.postMessage when all content fields are empty, so the bug surfaces in your logs with a stack trace. 3. Fix the upstream builder or template branch that produced empty content. 4. When using blocks, still set text to a meaningful notification fallback string.

Should I retry after error no_text?

No. Retrying the same request produces the same error; the condition has to be fixed first. Treat it as a permanent failure for that message and surface it, rather than looping.

Stop debugging Slack by hand

Connect the channel through Conferbot: tokens, webhooks and retries are handled, failures show as readable status.