summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/jqueryRest.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/jqueryRest.js b/src/jqueryRest.js
index 20692e9..bc3bb51 100644
--- a/src/jqueryRest.js
+++ b/src/jqueryRest.js
@@ -70,7 +70,10 @@ srp.remote = (function(){
// the http error response.
function error(xhr, text, thrown)
{
- srp.error($.parseJSON(xhr.responseText))
+ if (xhr.responseText && xhr.responseText != "")
+ srp.error($.parseJSON(xhr.responseText));
+ else
+ srp.error("Server did not respond.");
};
return {