mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 12:56:41 +07:00
fixed error handling
This commit is contained in:
parent
b95d53791c
commit
0873e77ff4
5 changed files with 20 additions and 19 deletions
|
@ -99,7 +99,7 @@ function* onNodeSave({ node }: ReturnType<typeof nodeSave>) {
|
|||
|
||||
return yield put(modalSetShown(false));
|
||||
} catch (error) {
|
||||
yield put(nodeSetSaveErrors({ error: error || ERRORS.CANT_SAVE_NODE }));
|
||||
yield put(nodeSetSaveErrors({ error: error.message || ERRORS.CANT_SAVE_NODE }));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -214,7 +214,7 @@ function* onPostComment({ nodeId, comment, callback }: ReturnType<typeof nodePos
|
|||
callback();
|
||||
}
|
||||
} catch (error) {
|
||||
return callback(error);
|
||||
return callback(error.message);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue