diff --git a/publish.gradle b/publish.gradle index edb7d28..11e738b 100644 --- a/publish.gradle +++ b/publish.gradle @@ -64,6 +64,11 @@ if (project.hasProperty('sonatypeUsername') && project.hasProperty('sonatypePass name 'Vasily Karyaev' email 'v.karyaev@gmail.com' } + developer { + id 'aqman1' + name 'Grigory Osin' + email 'aqman@ecwid.com' + } } } } diff --git a/src/main/java/com/ecwid/maleorang/MailchimpClient.kt b/src/main/java/com/ecwid/maleorang/MailchimpClient.kt index 146185c..1e5338d 100644 --- a/src/main/java/com/ecwid/maleorang/MailchimpClient.kt +++ b/src/main/java/com/ecwid/maleorang/MailchimpClient.kt @@ -60,9 +60,11 @@ open class MailchimpClient protected constructor ( var description = response.reasonPhrase if (response.responseBody != null) { - val error = JsonParser().parse(response.responseBody).asJsonObject - code = error.get("status").asInt - description = error.get("detail").asString + try { + val error = JsonParser().parse(response.responseBody).asJsonObject + code = error.get("status").asInt + description = error.get("detail").asString + } catch (e: Exception){} } throw MailchimpException(code, description)