aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRobert Jaros <rjaros@finn.pl>2019-11-06 18:39:27 +0100
committerRobert Jaros <rjaros@finn.pl>2019-11-06 18:39:27 +0100
commitb635f78389cd032ead73a771a6fb8a02b2273159 (patch)
tree515ba5006907d2d6e87cc910fd623aa04cbb907f /src
parentde3007e68ea7ee3793143816f8430703ee82fadb (diff)
downloadkvision-b635f78389cd032ead73a771a6fb8a02b2273159.tar.gz
kvision-b635f78389cd032ead73a771a6fb8a02b2273159.tar.bz2
kvision-b635f78389cd032ead73a771a6fb8a02b2273159.zip
Fix exception handling in RestClient
Diffstat (limited to 'src')
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/rest/RestClient.kt6
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
})