Allow better debugging when an incomplete response was received or
timed out. The already received part (empty on timeout) is passed as
the first and only argument in the ValueError exception, accessible as
e.args[0] in a handler.
I find the choice of ValueError exception kind of confusing for this type of error, but anything else would break compatibility. So I opted to just add the (partial) response verbatim as an argument. If it is empty, a TimeoutError or similar might be easier to understand?
Coverage decreased (-0.1%) to 96.158% when pulling 7522a4fe882f69f2563fce8c2bf56a01aadd67ce on acolomb:pass-partial-response-in-exception into f1128a73e43f565bacedd1ae99d077d7c9c831f3 on AdvancedClimateSystems:master.
Allow better debugging when an incomplete response was received or timed out. The already received part (empty on timeout) is passed as the first and only argument in the ValueError exception, accessible as e.args[0] in a handler.
I find the choice of
ValueError
exception kind of confusing for this type of error, but anything else would break compatibility. So I opted to just add the (partial) response verbatim as an argument. If it is empty, aTimeoutError
or similar might be easier to understand?