jossef / jossef/requests

Can't catch SocketException

Open
#17 10 comments 0 reactions 0 assignees View on GitHub
bug help wanted
Dominant language
Dart
Stars
143
Forks
52
PR merge metrics
No merged PRs in 30d

Description

```
Exception has occurred.
SocketException (SocketException: OS Error: Connection timed out, errno = 110, address = carlhung.mynetgear.com, port = 45396)
```

I can catch the returned result. but after a while, the simulator of android will crash with SocketException.
my code:
```
try {
request = await Requests.post(
url + '/login',
headers: {'content-type': 'application/json'},
json: dic,
verify: false,
// timeoutSeconds: 5,
);
} catch (e) {
return {"result":"Connection Error: $e"};
}
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.