Join Slack
Powered by
is there any way to catch connection errors in Kto...
# ktor
m
Mikhail
07/11/2022, 4:22 PM
is there any way to catch connection errors in Ktor client? Am using OkHttp engine
a
Aleksei Tirman [JB]
07/11/2022, 4:34 PM
You can wrap a client’s call in the
try/catch
and catch specific exceptions.
m
Mikhail
07/11/2022, 5:03 PM
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
Aleksei Tirman [JB]
07/11/2022, 5:15 PM
Unfortunately, there are different types of exceptions that vary for each engine. We have a
feature request
about unifying them.
👍 1
5
Views
Open in Slack
Previous
Next