fixed error handling of options

This commit is contained in:
John Mitchell
2016-04-06 15:48:00 -04:00
parent 967194a3f3
commit c2d9cf466d

View File

@@ -93,18 +93,19 @@ export default ['Rest', '$q', 'GetBasePath', 'Wait', 'ProcessErrors', function(R
value: i[0], value: i[0],
label: i[1] label: i[1]
}; };
}); });
return option;
return option; });
Wait("stop");
defer.resolve(joinOptions());
}) })
.error(function (data, status) { .error(function (data, status) {
Wait("stop");
defer.reject("options request failed");
ProcessErrors(null, data, status, null, { ProcessErrors(null, data, status, null, {
hdr: 'Error!', hdr: 'Error!',
msg: 'Getting type options failed'}); msg: 'Getting type options failed'});
}); });
Wait("stop");
defer.resolve(joinOptions());
});
} else { } else {
Wait("stop"); Wait("stop");
defer.resolve(joinOptions()); defer.resolve(joinOptions());