From cc677e73ba04722e1cd23002aaff42aed6656594 Mon Sep 17 00:00:00 2001 From: Pranav-b-7 Date: Thu, 31 Mar 2022 13:54:47 +0530 Subject: [PATCH] Made some changes in error parse logic --- .../opsmx/spinnaker/gate/exception/RetrofitErrorHandler.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gate-web/src/main/groovy/com/opsmx/spinnaker/gate/exception/RetrofitErrorHandler.groovy b/gate-web/src/main/groovy/com/opsmx/spinnaker/gate/exception/RetrofitErrorHandler.groovy index 16f4a48c93..80c7b48430 100644 --- a/gate-web/src/main/groovy/com/opsmx/spinnaker/gate/exception/RetrofitErrorHandler.groovy +++ b/gate-web/src/main/groovy/com/opsmx/spinnaker/gate/exception/RetrofitErrorHandler.groovy @@ -52,7 +52,7 @@ class RetrofitErrorHandler { return new ResponseEntity(networkErrorResponse, HttpStatus.INTERNAL_SERVER_ERROR) } if (retrofitError.getResponse()!=null && retrofitError.getResponse().getStatus() > 0){ - if (retrofitError.getBody() instanceof Response){ + if (retrofitError.getResponse().getBody() !=null){ InputStream inputStream = null try { inputStream = retrofitError.getResponse().getBody().in()