Skip to content

Action silently fails when there is too much text #448

Closed

Description

@mcasperson

Attempting to send a large amount of text in a block results in the action silently failing.

I found that when I attempted to recreate the webhook API call in a tool like Postman, I was getting an invalid_blocks response. This appears to be because I ran over the character limit for a block (my post was over 5000 characters), as discussed on StackOverflow.

But the GitHub Action never reported any error and succeeded. I would have expected the failed API call to result in the action also failing.

Activity

  1. added
    bugSomething isn't working
    needs infoAn issue that is claimed to be a bug and hasn't been reproduced, or otherwise needs more info
    on May 28, 2025
  2. mwbrooks commented on May 28, 2025

    @mwbrooks
    Member

    Hi @mcasperson 👋🏻 Thanks for sharing this issue and for confirming the valid error with the Webhook API. That's immensely helpful 🙇🏻

    ❓ What version of the Slack GitHub Action are using? We've recently added some additional error handling, so I'd just like to confirm that this a bug in the latest version.

  3. zimeg commented on May 28, 2025

    @zimeg
    Member

    👋 Adding to what @mwbrooks has said, @v2 has an errors option to return an exit code for errors from the API that defaults to false.

    This default is used to avoid blocking CI during unexpected downtime or from invalid IDs, but might require setting this value to true to raise the errors you're expecting 📚

    I'm also curious about the step inputs being used though? We can look into improving how errors are surfaced in all cases! 👾 ✨

  4. mcasperson commented on May 28, 2025

    @mcasperson
    Author

    I am using version 2.1.0:

    slackapi/slack-github-action@v2.1.0
    
  5. mcasperson commented on May 28, 2025

    @mcasperson
    Author

    @zimeg I was not aware of the errors property, so I'll set that to true and see if that resolves the issue. Thanks for the heads up!

  6. edgarvonk commented on May 5, 2026

    @edgarvonk

    It seems we are running into this issue as well. We use this action to send our continuously growing sprint changelog to Slack and this can grow quite large. We have temporarily (?) added the errors: true option and the GitHub action now logs the following:

    Error: SlackError: Request failed with status code 400
    Error: Request failed with status code 400
    
    SlackError: Request failed with status code 400
        at Webhook.post (file:///home/runner/work/_actions/slackapi/slack-github-action/45a88b9581bfab2566dc881e2cd66d334e621e2c/src/webhook.js:40:1)
        at processTicksAndRejections (node:internal/process/task_queues:104:5)
        at post (file:///home/runner/work/_actions/slackapi/slack-github-action/45a88b9581bfab2566dc881e2cd66d334e621e2c/src/send.js:34:1)
        at send (file:///home/runner/work/_actions/slackapi/slack-github-action/45a88b9581bfab2566dc881e2cd66d334e621e2c/src/send.js:14:1)
        at file:///home/runner/work/_actions/slackapi/slack-github-action/45a88b9581bfab2566dc881e2cd66d334e621e2c/src/index.js:9:1
    file:///home/runner/work/_actions/slackapi/slack-github-action/45a88b9581bfab2566dc881e2cd66d334e621e2c/src/webhook.js:40
          throw new SlackError(config.core, response.message);
    ^
    SlackError: Request failed with status code 400
        at Webhook.post (file:///home/runner/work/_actions/slackapi/slack-github-action/45a88b9581bfab2566dc881e2cd66d334e621e2c/src/webhook.js:40:1)
        at processTicksAndRejections (node:internal/process/task_queues:104:5)
        at post (file:///home/runner/work/_actions/slackapi/slack-github-action/45a88b9581bfab2566dc881e2cd66d334e621e2c/src/send.js:34:1)
        at send (file:///home/runner/work/_actions/slackapi/slack-github-action/45a88b9581bfab2566dc881e2cd66d334e621e2c/src/send.js:14:1)
        at file:///home/runner/work/_actions/slackapi/slack-github-action/45a88b9581bfab2566dc881e2cd66d334e621e2c/src/index.js:9:1
    

    Is there a workaround at all for sending large messages to Slack using this action or does this require a fix?

  7. zimeg commented on May 6, 2026

    @zimeg
    Member

    @edgarvonk Sounds like exciting times ahead! 🚀 🔮 ✨

    A stable approach for uploading lots of content might prefer to upload your changelog as either a file or as a link to the contents online. I recommend sharing contents as a file if it's in markdown already:

    🔗 https://docs.slack.dev/tools/slack-github-action/sending-data-slack-api-method/#uploading-a-file

  8. edgarvonk commented on May 6, 2026

    @edgarvonk

    Thanks @zimeg! We will look into the option of uploading a file instead of a large message.

  9. zimeg commented on Aug 11, 2026

    @zimeg
    Member

    🗣️ Will close this now with changes of #666 for next release!

  10. added this to the 4.1 milestone on Aug 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingneeds infoAn issue that is claimed to be a bug and hasn't been reproduced, or otherwise needs more info

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions