Errors thrown by Durable Object stubs can include retryable and overloaded properties, as documented in the
https://developers.cloudflare.com/durable-objects/best-practices/error-handling/. However, there's no exported TypeScript type for this in the generated runtime types or @cloudflare/workers-types.
Currently everyone has to define their own type:
interface DurableObjectError extends Error {
retryable?: boolean;
overloaded?: boolean;
}
It would be nice to have an official type shipped with the runtime types so error handling can be done in a type-safe way without custom definitions.
Errors thrown by Durable Object stubs can include retryable and overloaded properties, as documented in the
https://developers.cloudflare.com/durable-objects/best-practices/error-handling/. However, there's no exported TypeScript type for this in the generated runtime types or @cloudflare/workers-types.
Currently everyone has to define their own type:
It would be nice to have an official type shipped with the runtime types so error handling can be done in a type-safe way without custom definitions.