Handling Errors in `tryPromise` Catch Callback: Defect Translation Explained

What would happen if an error was thrown from catch callback of tryPromise? Can I rely on this being translated into a defect? Thanks!

Example:

Effect.tryPromise({
  try: () => myFunc(),
  catch: cause => {
    if (cause instanceof SomeExpectedError) {
      return new MyTaggedError({ cause })
    }
    throw cause
  }
})
Was this page helpful?