sgqlc icon indicating copy to clipboard operation
sgqlc copied to clipboard

RequestsEndpoint does not intercept ReadTimeout errors

Open grazzolini opened this issue 3 years ago • 1 comments

When using the RequestsEndpoint for fetching data, if you do not set the timeout, it uses requests defaults, which means no timeout.

However, if setting a timeout, the endpoint is not intercepting ReadTimeout errors. This is fine, and I can intercept this when making the call, but it would be nice if sgqlc also handled this. If this is something that the project wants, I can make a PR for this.

Judging by the HTTPEndpoint code, it's also not intercepting timeout errors, but I have not tested this to be sure.

grazzolini avatar Sep 23 '21 14:09 grazzolini

Indeed, we're not intercepting those. It would be nice to, then translate to the common error.

If you can provide a PR, excellent. If you can check that for other endpoints, even better :-)

barbieri avatar Sep 27 '21 18:09 barbieri