From b635f78389cd032ead73a771a6fb8a02b2273159 Mon Sep 17 00:00:00 2001 From: Robert Jaros Date: Wed, 6 Nov 2019 18:39:27 +0100 Subject: Fix exception handling in RestClient --- src/main/kotlin/pl/treksoft/kvision/rest/RestClient.kt | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/main/kotlin/pl/treksoft/kvision/rest/RestClient.kt b/src/main/kotlin/pl/treksoft/kvision/rest/RestClient.kt index b2aae632..c3753b9b 100644 --- a/src/main/kotlin/pl/treksoft/kvision/rest/RestClient.kt +++ b/src/main/kotlin/pl/treksoft/kvision/rest/RestClient.kt @@ -352,11 +352,7 @@ open class RestClient { } else { errorText } - if (xhr.status.toInt() == HTTP_UNAUTHORIZED) { - reject(SecurityException(message)) - } else { - reject(Exception(message)) - } + reject(Exception(message)) } this.beforeSend = beforeSend }) -- cgit