1
0
Fork 0
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:
Fedor Katurov 2021-03-04 13:57:00 +07:00
parent b95d53791c
commit 0873e77ff4
5 changed files with 20 additions and 19 deletions

View file

@ -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);
}
}