πŸ‘‹ i noticed that errors thrown from

πŸ‘‹ i noticed that errors thrown from functions called across a workers RPC boundary don't contain the original stack trace (for example when calling a function on a durable object stub or a service binding)

the serialized error that crosses the RPC boundary only contains the error message but not the stack

i'd really like to retain the original stack trace. what's a good pattern for doing that? stuff the stack trace in the message? or could i throw a custom error with the stack trace serialized in a property? would that cross the RPC boundary?

and is there a place where i can intercept any errors thrown out of the RPC boundary from the callee's side?
Was this page helpful?