diff options
author | Robert Jaros <rjaros@finn.pl> | 2019-11-06 18:39:27 +0100 |
---|---|---|
committer | Robert Jaros <rjaros@finn.pl> | 2019-11-06 18:39:27 +0100 |
commit | b635f78389cd032ead73a771a6fb8a02b2273159 (patch) | |
tree | 515ba5006907d2d6e87cc910fd623aa04cbb907f /src/main/kotlin/pl/treksoft | |
parent | de3007e68ea7ee3793143816f8430703ee82fadb (diff) | |
download | kvision-b635f78389cd032ead73a771a6fb8a02b2273159.tar.gz kvision-b635f78389cd032ead73a771a6fb8a02b2273159.tar.bz2 kvision-b635f78389cd032ead73a771a6fb8a02b2273159.zip |
Fix exception handling in RestClient
Diffstat (limited to 'src/main/kotlin/pl/treksoft')
-rw-r--r-- | src/main/kotlin/pl/treksoft/kvision/rest/RestClient.kt | 6 |
1 files changed, 1 insertions, 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 }) |