Skip to content

Commit 2f6108a

Browse files
committed
Error message has been already shown by alert popup.
Error page will be only shown for error code 500 (as hard-coded for the CoderBot).
1 parent b202293 commit 2f6108a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/reducers/templates.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,14 +165,14 @@ export default function(state = initialState, action) {
165165
return {
166166
...state,
167167
isLoading: false,
168-
error: action.payload.response.data.result.content.message
168+
error: action.payload.response.data.result.status >= 500
169169
}
170170
case UPDATE_PROJECTS_METADATA_FAILURE:
171171
Alert.error(`PROJECT METADATA UPDATE FAILED: ${action.payload.response.data.result.content.message}`)
172172
return {
173173
...state,
174174
isLoading: false,
175-
error: action.payload.response.data.result.content.message
175+
error: action.payload.response.data.result.status >= 500
176176
}
177177
case REMOVE_PROJECTS_METADATA_FAILURE:
178178
case REMOVE_PRODUCT_CATEGORY_FAILURE:
@@ -183,7 +183,7 @@ export default function(state = initialState, action) {
183183
return {
184184
...state,
185185
isRemoving: false,
186-
error: action.payload.response.data.result.content.message
186+
error: action.payload.response.data.result.status >= 500
187187
}
188188
case ADD_PROJECTS_METADATA_SUCCESS:
189189
case CREATE_PROJECT_TEMPLATE_SUCCESS:

0 commit comments

Comments
 (0)