diff --git a/rd_ui/app/scripts/services/resources.js b/rd_ui/app/scripts/services/resources.js index 030e56abb4..4ffd465635 100644 --- a/rd_ui/app/scripts/services/resources.js +++ b/rd_ui/app/scripts/services/resources.js @@ -377,7 +377,10 @@ refreshStatus(queryResult, query); }, 3000); } - }) + }, function(error) { + console.log("Connection error", error); + queryResult.update({job: {error: 'failed communicating with server. Please check your Internet connection and try again.', status: 4}}) + }); } QueryResult.getById = function (id) { @@ -413,6 +416,9 @@ queryResult.update(error.data); } else if (error.status === 400 && 'job' in error.data) { queryResult.update(error.data); + } else { + console.log("Unknown error", error); + queryResult.update({job: {error: 'unknown error occurred. Please try again later.', status: 4}}) } }); @@ -586,7 +592,7 @@ this.cachedQueryText = this.query.query; var parameterNames = this.parseQuery(); - this.query.options.parameters = this.query.options.parameters || {}; + this.query.options.parameters = this.query.options.parameters || []; var parametersMap = {}; _.each(this.query.options.parameters, function(param) {