OSDN Git Service

report update alias error
authorYongfeng LI <wliyongfeng@gmail.com>
Wed, 18 Apr 2018 03:04:12 +0000 (11:04 +0800)
committerYongfeng LI <wliyongfeng@gmail.com>
Wed, 18 Apr 2018 03:04:12 +0000 (11:04 +0800)
src/features/shared/actions/update.js

index 2df6198..13861bb 100644 (file)
@@ -15,6 +15,9 @@ export default function(type, options = {}) {
           id: id,
           alias: data.alias,
         }).then((resp) => {
+          if (resp.status === 'fail') {
+            throw new Error(resp.msg)
+          }
           dispatch(updated(resp))
 
           dispatch(push({