chore: Don't unnecessarily wrap IOExceptions in UncaughtExceptionInterceptor

This commit is contained in:
arkon 2024-08-26 07:08:04 +07:00 committed by Ahmad Ansori Palembani
parent 2debbc0a10
commit 5bd2190980
Signed by: null2264
GPG key ID: BA64F8B60AF3EFB6

View file

@ -18,7 +18,11 @@ class UncaughtExceptionInterceptor : Interceptor {
return try {
chain.proceed(chain.request())
} catch (e: Exception) {
throw IOException(e)
if (e is IOException) {
throw e
} else {
throw IOException(e)
}
}
}
}