Workers API

Hey everyone, I am having this issue that I am unable to catch the error that's get occured in a workflow. I have gone through the docs https://developers.cloudflare.com/workflows/build/workers-api/#instancestatus.

But from what I understand is that I cannot invoke the instance.status(). error inside the scope of the run function. Then how can I catch and get the error, store it in a db. Can anybody please help with this
Cloudflare Docs
This guide details the Workflows API within Cloudflare Workers, including methods, types, and usage examples.
Workers API
Was this page helpful?