I have some feedback – it seems that in a step.do() not the full error message may be shown on the d

I have some feedback – it seems that in a step.do() not the full error message may be shown on the dashboard? it just says ZodError; I doubt it's an issue on zod's side?

await step.do("detect spam", async () => {
  return await detectSpam(this.env, opts.payload.message.content);
});


check spam basically does this:
    const response = await ai(env).chat.completions.create({
        response_format: zodResponseFormat(schema, "spam_detection"),
        model: "gpt-4o",
        messages: [
            {
                role: "user",
                content: prompt,
            },
        ],
    });

    return schema.parse(JSON.parse(response.choices[0].message.content || "{}"));
image.png
Was this page helpful?