timeout duration { ... } returns Result<Any, TimeoutError>. The timeout
failure is ordinary typed control flow; it is not an untyped record and it is
not silently converted to the successful value.
let response: Response = timeout 2s { await client.fetch(request) }
// ^ error[TE233]: handle the Result before using it as ResponseHandle or propagate the result explicitly:
let response = timeout 2s { await client.fetch(request) }?
match timeout 2s { await client.fetch(request) } {
Result::Ok(response) => render(response),
Result::Err(error) => show_timeout(error.message),
}See also TE220 for invalid await operands.