aboutsummaryrefslogtreecommitdiffstats
path: root/python/Dawn/static/utils.js
diff options
context:
space:
mode:
Diffstat (limited to 'python/Dawn/static/utils.js')
-rw-r--r--python/Dawn/static/utils.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/python/Dawn/static/utils.js b/python/Dawn/static/utils.js
index 0b886e8f..f74d681f 100644
--- a/python/Dawn/static/utils.js
+++ b/python/Dawn/static/utils.js
@@ -14,8 +14,12 @@ function query(url, params, callback){
var xhr = new XMLHttpRequest();
xhr.open('GET', url + '?' + encode_dict(params));
xhr.onreadystatechange = function() {
- if( xhr.readyState === 4){
- callback(xhr.responseText);
+ if( xhr.readyState === 4 ) {
+ if( xhr.status === 200 ) {
+ callback(xhr.responseText)
+ } else if ( xhr.status === 400 ) {
+ console.log(xhr.responseText)
+ }
}
}
xhr.send();