fluttercandies/http_client_helper

Catch socket exception from http packet

vesuvi88 opened this issue · 0 comments

Hello everyone!
The api to the package states that "ClientException caused by an error in a pkg/http client", but when a socket exception occurs in the http package, HttpClientHelper does not issue it out. In my application, the client may mistakenly enter the address of the working portal - enter https instead of http. In this case, the http packet returns a socket exception that I can catch and easily handle. And HttpClientHelper does not throw an exception, but simply returns a null server response. According to my assumptions, the exception is caught in the CancellationTokenSource class and is not thrown out.

Screenshot 2021-11-19 at 13 53 46