Hi guys :wave: We’re using ktor client and and a ...
# ktor
r
Hi guys 👋 We’re using ktor client and and a typical way we’d like to separate our network related errors is: • No Server response error - network instability related issues OR server down; • Unexpected response error - failure to parse response like deserialisation errors or body decompression errors; • API call response error - non 2xx response. We’ve had some troubles classifying ktor exceptions into these, particularly between the first two. Any advices? 🙏 thanks in advance!
For the no server response error, I also wonder if it’s possible to know (at least in majority of cases) whether server received the request or not.
We were considering IOException as NoServerResponseError, but we found a new case where we failed to decompress response body (Related to another issue with Deflate algorithm which I’ll create another thread for) and it also created an IOException. Which makes sense, but made me wonder if there is a way to categorise it like we want to 🤔