From af304197f17ccde596527ae27d4e02c978a3e2c0 Mon Sep 17 00:00:00 2001 From: dalbodeule <11470513+dalbodeule@users.noreply.github.com> Date: Fri, 7 Jun 2024 11:11:04 +0900 Subject: [PATCH] fix pdns api clients (retry 12x) --- src/main/kotlin/space/mori/dnsapi/PowerDNSAPIClient.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/kotlin/space/mori/dnsapi/PowerDNSAPIClient.kt b/src/main/kotlin/space/mori/dnsapi/PowerDNSAPIClient.kt index a6a0cc0..5a86460 100644 --- a/src/main/kotlin/space/mori/dnsapi/PowerDNSAPIClient.kt +++ b/src/main/kotlin/space/mori/dnsapi/PowerDNSAPIClient.kt @@ -38,7 +38,7 @@ class PowerDNSAPIClient() { val response = client.newCall(request).execute() if(!response.isSuccessful) { - throw gson.fromJson(response.body?.string(), Error::class.java) + throw gson.fromJson(response.body?.string(), PowerDNSAPIError::class.java) } return response } @@ -54,7 +54,7 @@ class PowerDNSAPIClient() { val response = client.newCall(request).execute() if(!response.isSuccessful) { - throw gson.fromJson(response.body?.string(), Error::class.java) + throw gson.fromJson(response.body?.string(), PowerDNSAPIError::class.java) } return response } @@ -94,7 +94,7 @@ class PowerDNSAPIClient() { val response = client.newCall(request).execute() if(!response.isSuccessful) { - throw gson.fromJson(response.body?.string(), Error::class.java) + throw gson.fromJson(response.body?.string(), PowerDNSAPIError::class.java) } return response } @@ -110,7 +110,7 @@ class PowerDNSAPIClient() { val response = client.newCall(request).execute() if(!response.isSuccessful) { - throw gson.fromJson(response.body?.string(), Error::class.java) + throw gson.fromJson(response.body?.string(), PowerDNSAPIError::class.java) } return response }