Heirless LionH
Windmill3y ago
5 replies
Heirless Lion

Internal: Result of job is invalid json (empty)

Hey,

I'm getting the following error while trying to execute a simple Bun script (sending a Slack message):

Unexpected error during job execution:
Object {
    "message": String("Internal: Result of job is invalid json (empty)"),
    "name": String("InternalErr"),
}


The code I'm trying to run looks like this:

import { WebClient } from "@slack/web-api";

type Slack = {
  token: string;
};

export async function main(
  slack: Slack,
  channel: string,
  message: string,
) {
  const web = new WebClient(slack.token);
  await web.chat.postMessage({
    channel,
    text: message,
  });
  return { channel, message };
}


The code executes seamlessly when I remove web.chat.PostMessage. Wrapping the entire script with a try/catch does not seem to work either - nothing gets caught.

Any ideas what might be going on here?
Was this page helpful?