From ec13a5c1f0cfe6040dbb1cc044aeb4952535811a Mon Sep 17 00:00:00 2001 From: Cedric Beust Date: Thu, 24 Dec 2015 22:03:22 +0400 Subject: [PATCH] NPE. --- .../src/main/kotlin/com/beust/kobalt/misc/GithubApi.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/kobalt-plugin-api/src/main/kotlin/com/beust/kobalt/misc/GithubApi.kt b/modules/kobalt-plugin-api/src/main/kotlin/com/beust/kobalt/misc/GithubApi.kt index 7041d4b3..4864b3d5 100644 --- a/modules/kobalt-plugin-api/src/main/kotlin/com/beust/kobalt/misc/GithubApi.kt +++ b/modules/kobalt-plugin-api/src/main/kotlin/com/beust/kobalt/misc/GithubApi.kt @@ -37,7 +37,7 @@ public class GithubApi @Inject constructor(val executors: KobaltExecutors, private fun parseRetrofitError(e: Throwable) : RetrofitErrorsResponse { val re = e as RetrofitError - val json = String((re.response.body as TypedByteArray).bytes) + val json = String((re.response?.body as TypedByteArray).bytes) return Gson().fromJson(json, RetrofitErrorsResponse::class.java) }