aboutsummaryrefslogtreecommitdiff
path: root/kvision-modules/kvision-remote/src/main/kotlin
diff options
context:
space:
mode:
Diffstat (limited to 'kvision-modules/kvision-remote/src/main/kotlin')
-rw-r--r--kvision-modules/kvision-remote/src/main/kotlin/pl/treksoft/kvision/remote/CallAgent.kt4
1 files changed, 4 insertions, 0 deletions
diff --git a/kvision-modules/kvision-remote/src/main/kotlin/pl/treksoft/kvision/remote/CallAgent.kt b/kvision-modules/kvision-remote/src/main/kotlin/pl/treksoft/kvision/remote/CallAgent.kt
index eb88ba8b..1a9460f2 100644
--- a/kvision-modules/kvision-remote/src/main/kotlin/pl/treksoft/kvision/remote/CallAgent.kt
+++ b/kvision-modules/kvision-remote/src/main/kotlin/pl/treksoft/kvision/remote/CallAgent.kt
@@ -86,6 +86,8 @@ open class CallAgent {
{ xhr: JQueryXHR, _: String, errorText: String ->
val message = if (xhr.responseJSON != null && xhr.responseJSON != undefined) {
xhr.responseJSON.toString()
+ } else if (xhr.responseText != undefined) {
+ xhr.responseText
} else {
errorText
}
@@ -130,6 +132,8 @@ open class CallAgent {
{ xhr: JQueryXHR, _: String, errorText: String ->
val message = if (xhr.responseJSON != null && xhr.responseJSON != undefined) {
NativeJSON.stringify(xhr.responseJSON)
+ } else if (xhr.responseText != undefined) {
+ xhr.responseText
} else {
errorText
}