Skip to content

Timeout should be handled by the http client not the library #1457

Open
@RobertBrunhage

Description

Having timeouts with requests doesn't propagate through links and in general has caused weird behaviors such as causing timeout on app start (even though manually setting timeout to 60 sec). As it's not getting passed through the links as an exception it's no reasonable way to have it trigger a RetryLink either.

await link.request(request).timeout(Duration(seconds: 5)).first;
removing the timeout here and controlling the timeout on the http client gave the correct response with it propagating through the links for retries and error reporting.

To Reproduce (MUST BE PROVIDED)
Make a request that is longer than the timeout (you can set the timeout to 1 sec) and check if ErrorLink can print it.

Expected behavior
timeout should be controlled through the http client and timeouts should pass through the links.

device / execution context
iOS/Android

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions