Skip to content

Commit

Permalink
fix: use error.httpStatusCode instead of error.status for d2 errors (#35
Browse files Browse the repository at this point in the history
)
  • Loading branch information
mediremi authored Mar 29, 2021
1 parent d81d2d0 commit b6e9275
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/actions/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ export function fetchAndToggleNamespace(namespace, openNamespace = false) {
})
.then(() => dispatch(toggleNamespace(namespace, openNamespace)))
.catch(error => {
if (error.status === 404) {
if (error.httpStatusCode === 404) {
// If not found, we remove the namespace from UI
return dispatch(receiveDeleteNamespace(namespace))
} else if (error) {
Expand Down Expand Up @@ -545,7 +545,7 @@ export function deleteKey(namespace, key) {
})
.then(() => dispatch(fetchKeys(namespace)))
.catch(error => {
if (error.status === 404) {
if (error.httpStatusCode === 404) {
// If not found, we remove the namespace from UI
dispatch(receiveDeleteNamespace(namespace))
} else if (error) {
Expand Down

0 comments on commit b6e9275

Please sign in to comment.