Skip to content

Commit 184784f

Browse files
committed
fix: handle specific exception
1 parent c4df3a9 commit 184784f

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

app/src/main/java/com/klee/sapio/data/RetrofitClient.kt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import okhttp3.MultipartBody
1515
import okhttp3.OkHttpClient
1616
import okhttp3.RequestBody.Companion.toRequestBody
1717
import retrofit2.Call
18+
import retrofit2.HttpException
1819
import retrofit2.Response
1920
import retrofit2.Retrofit
2021
import retrofit2.converter.jackson.JacksonConverterFactory
@@ -159,9 +160,7 @@ class EvaluationService @Inject constructor(
159160
settings.getRootConfigurationLevel(),
160161
pageNumber
161162
).await()
162-
} catch (exception: Exception) {
163-
exception.printStackTrace()
164-
}
163+
} catch (exception: HttpException) {}
165164

166165
return strapiAnswer
167166
}

0 commit comments

Comments
 (0)