Skip to content
This repository was archived by the owner on Feb 4, 2025. It is now read-only.

Commit b04c5ae

Browse files
committed
Supressed detekt complain
1 parent c3ba275 commit b04c5ae

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

plugins/woocommerce/src/main/kotlin/org/wordpress/android/fluxc/network/rest/wpcom/wc/payments/inperson/InPersonPaymentsRestClient.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,12 +234,13 @@ class InPersonPaymentsRestClient @Inject constructor(
234234
)
235235
}
236236

237-
fun VolleyError.getExtraData(): Map<String, Any>? {
237+
@Suppress("TooGenericExceptionCaught")
238+
private fun VolleyError.getExtraData(): Map<String, Any>? {
238239
val jsonString = this.networkResponse?.data?.toString(Charsets.UTF_8)
239240
return try {
240241
val mapType = object : TypeToken<Map<String, Any>>() {}.type
241242
return gson.fromJson<Map<String, Any>>(jsonString, mapType)["data"] as Map<String, Any>?
242-
} catch (e: Exception) {
243+
} catch (e: Throwable) {
243244
AppLog.e(AppLog.T.API, "Error parsing volley error $jsonString", e)
244245
null
245246
}

0 commit comments

Comments
 (0)