AsyncResult.try<T>(fn: () => Promise<T>,context?: Record<string, unknown>): AsyncResult<T, UnexpectedError>
Wraps an async function that might throw into an AsyncResult.
Catches any exceptions and wraps them in UnexpectedError.
fn: () => Promise<T>
Async function that might throw
AsyncResult with the return value or UnexpectedError