Heirless Lion
Heirless Lion
WWindmill
Created by Heirless Lion on 12/27/2023 in #help
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"),
}
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 };
}
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?
6 replies