Result.try<T>(fn: () => T,context?: Record<string, unknown>): Result<T, UnexpectedError>
Wraps a function that might throw into a Result.
Catches any exceptions and wraps them in UnexpectedError.
fn: () => T
Function that might throw
Ok with the return value, or Err with UnexpectedError