Handle unhandled promises that lead to unable to login

This commit is contained in:
Alex Tran
2022-07-24 08:41:06 -05:00
parent 052db5d748
commit 1ea6425cd1
2 changed files with 7 additions and 3 deletions

View File

@@ -22,6 +22,10 @@ export const flattenAssetGroupByDate = derived(assetsGroupByDate, ($assetsGroupB
});
export const getAssetsInfo = async () => {
const { data } = await api.assetApi.getAllAssets();
assets.set(data);
try {
const { data } = await api.assetApi.getAllAssets();
assets.set(data);
} catch (error) {
console.log('Error [getAssetsInfo]');
}
};