Skip to content

Commit

Permalink
Use correct HTTP status from failed DataService.list
Browse files Browse the repository at this point in the history
  • Loading branch information
spadgett committed Oct 23, 2017
1 parent ac7501d commit a39092a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions app/scripts/controllers/addConfigVolume.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ angular.module('openshiftConsole')
DataService.list($scope.configMapVersion, context, null, { errorNotification: false }).then(function(configMapData) {
$scope.configMaps = orderByDisplayName(configMapData.by("metadata.name"));
}, function(e) {
if (e.code === 403) {
if (e.status === 403) {
$scope.configMaps = [];
return;
}
Expand All @@ -154,7 +154,7 @@ angular.module('openshiftConsole')
DataService.list($scope.secretVersion, context, null, { errorNotification: false }).then(function(secretData) {
$scope.secrets = orderByDisplayName(secretData.by("metadata.name"));
}, function(e) {
if (e.code === 403) {
if (e.status === 403) {
$scope.secrets = [];
return;
}
Expand Down
4 changes: 2 additions & 2 deletions app/scripts/controllers/edit/deploymentConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ angular.module('openshiftConsole')
$scope.availableConfigMaps = configMapDataOrdered;
$scope.valueFromObjects = configMapDataOrdered.concat(secretDataOrdered);
}, function(e) {
if (e.code === 403) {
if (e.status === 403) {
return;
}

Expand All @@ -173,7 +173,7 @@ angular.module('openshiftConsole')
secretsArray.unshift("");
});
}, function(e) {
if (e.code === 403) {
if (e.status === 403) {
return;
}

Expand Down
4 changes: 2 additions & 2 deletions app/scripts/directives/deployImage.js
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ angular.module("openshiftConsole")
configMapDataOrdered = orderByDisplayName(configMapData.by("metadata.name"));
$scope.valueFromNamespace[project.metadata.name] = configMapDataOrdered.concat(secretDataOrdered);
}, function(e) {
if (e.code === 403) {
if (e.status === 403) {
return;
}

Expand All @@ -250,7 +250,7 @@ angular.module("openshiftConsole")
secretDataOrdered = orderByDisplayName(secretData.by("metadata.name"));
$scope.valueFromNamespace[project.metadata.name] = secretDataOrdered.concat(configMapDataOrdered);
}, function(e) {
if (e.code === 403) {
if (e.status === 403) {
return;
}

Expand Down

0 comments on commit a39092a

Please sign in to comment.