Skip to content

Missing type for Durable Object errors #6577

@arian81

Description

@arian81

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.

Metadata

Metadata

Labels

Durable Objectshttps://developers.cloudflare.com/durable-objects/typesRelated to @cloudflare/workers-types

Type

No type
No fields configured for issues without a type.

Projects

Status

Backlog

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions