WindmillWWindmill
Powered by
Heirless LionH
Windmill•3y 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"),
}
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
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?
WindmillJoin
3,362Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?
Recent Announcements
henri-c

Weekly kenote to tell you about our latest updates https://discord.com/channels/930051556043276338/1278977038430240813 https://youtube.com/live/2dGd9TdT8xs?feature=share

henri-c · 4d ago

Pyra

### HTTP tracing (EE) Capture HTTP requests made by job scripts as observability spans Features: - View HTTP request traces (method, URL, status, timing) in the job details UI - Auto-instrumentation for Native TypeScript, MITM proxy for other languages - Integrates with external OpenTelemetry collectors changelog: https://www.windmill.dev/changelog/http-tracing docs: https://www.windmill.dev/docs/advanced/instance_settings#http-tracing Additionally jobs memory metrics are now fully OSS!

Pyra · 2w ago

henri-c

First keynote of the year here https://discord.com/channels/930051556043276338/1278977038430240813 🙂

henri-c · 4w ago

Similar Threads

AI Generate Invalid Flow JSON
fooosieeeFfooosieee / help
2mo ago
Some parts of flow fails when parent_job is set
lfanewLlfanew / help
2y ago
Return Image instead of JSON
somebodywhocooksSsomebodywhocooks / help
3mo ago
Postgres TLS Connection is invalid
reevesRreeves / help
3y ago