is there any way to catch connection errors in Kto...
# ktor
m
is there any way to catch connection errors in Ktor client? Am using OkHttp engine
a
You can wrap a client’s call in the
try/catch
and catch specific exceptions.
m
This is exactly what I am doing, but the problem is that I'm not sure what exception is thrown on connection issues. Is it IOE?
a
Unfortunately, there are different types of exceptions that vary for each engine. We have a feature request about unifying them.
đź‘Ť 1