Skip to content

Commit 3b81f2d

Browse files
authored
Merge pull request #1591 from sumitdaga/issue-1575
tries to fix #1575
2 parents 7462133 + aa8e383 commit 3b81f2d

File tree

1 file changed

+2
-2
lines changed
  • src/shared/reducers/page/submission

1 file changed

+2
-2
lines changed

src/shared/reducers/page/submission/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ function onSubmitDone(state, { error, payload }) {
3939
/* TODO: I am not sure, whether this code is just wrong, or does it handle
4040
* only specific errors, returned from API for design submissions? I am
4141
* adding a more generic failure handling code just above. */
42-
if (payload.error) {
42+
if (payload.result && !payload.result.success) {
4343
return {
4444
...state,
45-
submitErrorMsg: payload.error.details || payload.error.name,
45+
submitErrorMsg: payload.result.content.message || 'Failed to submit',
4646
isSubmitting: false,
4747
submitDone: false,
4848
};

0 commit comments

Comments
 (0)