on errors, halts torque and displays them

This commit is contained in:
Francisco Dans 2015-04-14 17:45:22 +02:00
parent e96a1c7118
commit c04ab74a97

View File

@ -459,6 +459,13 @@
torque.net.jsonp(url, function (data) { torque.net.jsonp(url, function (data) {
map_instance_time.end(); map_instance_time.end();
if (data) { if (data) {
if (data.errors){
for (error in data.errors){
console.error(data.errors[error]);
return;
}
}
var torque_key = Object.keys(data.metadata.torque)[0] var torque_key = Object.keys(data.metadata.torque)[0]
var opt = data.metadata.torque[torque_key]; var opt = data.metadata.torque[torque_key];
for(var k in opt) { for(var k in opt) {