[squeak-dev] AITA - returning a 408 error for a WebClient request where the socket times out?
jakres+squeak at gmail.com
Sat Oct 8 10:57:33 UTC 2022
Are you asking whether it would be good to let WebClient automatically
convert socket timeouts to a WebResponse with status 408 _for everyone_?
I do not think that this is appropriate, since the server has never really
sent such a message (or at least it does not sound like it has in your
case). How much of an impact it has depends on the application using it,
whether they have error handling for NetworkError or this particular HTTP
status. Hence I would not pretend to the application that there was an
actual response if in fact there was none.
In your application, you may of course choose to convert the NetworkError
to a response, if you think that makes sense for the purpose of this
Am Fr., 7. Okt. 2022 um 23:01 Uhr schrieb tim Rowledge <tim at rowledge.org>:
> So far as I can see the WebClient code does not try to handle socket
> timeouts etc. If I handle NetworkError by faking a WebResponse with a 408
> code, Am I The Asshole? Will it cause the entire intertoobs to catch fire?
> tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
> No one is listening until you make a mistake
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Squeak-dev