OSDN Git Service

handle error for transaction
authorZhiting Lin <zlin035@uottawa.ca>
Tue, 6 Feb 2018 03:18:38 +0000 (11:18 +0800)
committerZhiting Lin <zlin035@uottawa.ca>
Tue, 6 Feb 2018 03:18:38 +0000 (11:18 +0800)
src/features/transactions/actions.js

index 805565d..3158831 100644 (file)
@@ -93,7 +93,8 @@ form.submitForm = (formParams) => function(dispatch) {
       }).then(resp => {
         if (resp.status === 'fail') {
           // TODO: deal with failure
-          return
+          throw(resp.msg)
+          // return
         }
 
         dispatch(form.created())