[squeak-dev] AITA - returning a 408 error for a WebClient request where the socket times out?

Jakob Reschke jakres+squeak at gmail.com
Sat Oct 8 10:57:33 UTC 2022


Hi Tim,

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
application.

Kind regards,
Jakob


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
> --
> 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...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20221008/3733fa50/attachment.html>


More information about the Squeak-dev mailing list