diff --git a/automation/dataseedingapi/src/main/kotlin/com/instructure/dataseeding/util/RestRetryInterceptor.kt b/automation/dataseedingapi/src/main/kotlin/com/instructure/dataseeding/util/RestRetryInterceptor.kt index c4d65eb0d7..e14fe32f03 100644 --- a/automation/dataseedingapi/src/main/kotlin/com/instructure/dataseeding/util/RestRetryInterceptor.kt +++ b/automation/dataseedingapi/src/main/kotlin/com/instructure/dataseeding/util/RestRetryInterceptor.kt @@ -40,8 +40,9 @@ object RestRetryInterceptor : Interceptor { if (response.failed) { val code = response.code - val body = response.body?.string() - throw RuntimeException("status code: $code\nbody: $body") + val contentType = response.body?.contentType() + response.close() + throw RuntimeException("status code: $code, content-type: $contentType") } return response