Serverless functions do not work, or the documentation supporting them is out of date

Hi!

I’m trying to create some custom serverless functions to be used in various places;

  • Inside a crawler configuration (Function on a single Row / Function on a single Cell)
  • In a ChatBot (Function instruction type)

I am using Typescript and Deno as suggested by the documentation. I’ve got the functions showing in our account, and managed to get a couple working - but for others I am getting very vague responses, that doesn’t seem to match the documentation around creating a plugin.

Can you please provide us with up to date information on what each type of serverless function expects to receive (with typescript definitions), expects to return, and what runtime (with version) is being used?

For an example, I am following the Chat Function (typescript) example from your documentation: Function Instruction Type | Hitchhikers

"message": "error invoking plugin: ZodError failed: [\n  {\n    \"expected\": \"'USER' | 'BOT'\",\n    \"received\": \"undefined\",\n    \"code\": \"invalid_type\",\n    \"path\": [\n      \"messages\",\n      1,\n      \"source\"\n    ],\n    \"message\": \"Required\"\n  }\n]\nstack trace:\n{\n\"expected\": \"'USER' | 'BOT'\",\n\"received\": \"undefined\",\n\"code\": \"invalid_type\",\n\"path\": [\n\"messages\",\n1,\n\"source\"\n],\n\"message\": \"Required\"\n}\n]\nat Object.get error (https://deno.land/x/zod@v3.23.8/types.ts:108:23)\nat ZodObject.parse (https://deno.land/x/zod@v3.23.8/types.ts:241:18)\nat MYAPP(MYAPP:src/MYAPP/index.ts:13:50)\nat invoke (plugin-host:worker/worker.ts:103:29)\nat self.onmessage (plugin-host:worker/worker.ts:34:28)\nat wrappedHandler (ext:deno_web/02_event.js:1426:12)\nat innerInvokeEventListeners (ext:deno_web/02_event.js:792:7)\nat invokeEventListeners (ext:deno_web/02_event.js:839:5)\nat dispatch (ext:deno_web/02_event.js:696:9)\nat dispatchEvent (ext:deno_web/02_event.js:1101:12)"

This really makes developing or trying to improve the platform a chore.

Also, for the above Chat Plugin, I am provided with an “Invocation ID” that when clicked… goes to a page saying it can’t be found.

Please, can someone also update your GitHub Org? There are a huge amount of repositories listed, that are either archived, stubs, contain no information or contain out of date information.

The core of this platform seems very promising, but with issues like this I think I’ll have to wait a few years before I suggest using it.