wrapped the body of a for in an if statement to filter unwanted properties - based on the warning received in travis run

This commit is contained in:
Amar Zavery 2014-08-12 20:10:20 -07:00
Родитель 2aa39ead95
Коммит c2f60bde4d
1 изменённых файлов: 7 добавлений и 4 удалений

Просмотреть файл

@ -755,16 +755,19 @@ ServiceClient._normalizeError = function (error, response) {
var odataErrorFormat = error['odata.error'] ? 1 : 0;
var errorProperties = error.Error || error.error || error['odata.error'] || error;
for (var property in errorProperties) {
var value = null;
if (odataErrorFormat) {
if (odataErrorFormat) {
for (var property in errorProperties) {
var value = null;
if (property === 'message' && !azureutil.objectIsString(errorProperties[property]) &&
errorProperties[property]['value']) {
value = errorProperties[property]['value'];
normalizedError[property.toLowerCase()] = value;
}
}
else {
}
else {
for (var property in errorProperties) {
var value = null;
if (property !== Constants.XML_METADATA_MARKER) {
if (errorProperties[property] && errorProperties[property][Constants.XML_VALUE_MARKER]) {
value = errorProperties[property][Constants.XML_VALUE_MARKER];