Error handling
Exceptions
An exception thrown by an RPC method implementation will propagate to the caller. If it is one of the standard JavaScript Error types, the message and prototype’s name will be retained, though the stack trace is not.
Unsupported error types
- If an
AggregateErroris thrown by an RPC method, it is not propagated back to the caller. - The
SuppressedErrortype from the Explicit Resource Management proposal is not currently implemented or supported in Workers. - Own properties of error objects, such as the
causeproperty, are not propagated back to the caller