Currently Slack transport can error under certain conditions when splitting lines.
Summary
Fixes Slack transport to avoid sending empty blocks.
Details
Slack webhook treats empty text blocks as invalid. This could have happened in splitByNewLine if the first line already exceeds Slack character limit. The fix avoids this by not starting the smallerBlocks array with createSectionBlock("").
Testing
Check a box to describe how you tested these changes and list the steps for reviewers to test.
[ ] Ran end-to-end test, running the code as in production
[ ] New unit tests created
[ ] Existing tests adequate, no new tests required
Motivation
Currently Slack transport can error under certain conditions when splitting lines.
Summary
Fixes Slack transport to avoid sending empty blocks.
Details
Slack webhook treats empty text blocks as invalid. This could have happened in splitByNewLine if the first line already exceeds Slack character limit. The fix avoids this by not starting the smallerBlocks array with createSectionBlock("").
Testing
Check a box to describe how you tested these changes and list the steps for reviewers to test.
Issue(s)
Fixes #XXXX