handle possible error case
gitea/hedera-web/pipeline/pr-beta This commit looks good
Details
gitea/hedera-web/pipeline/pr-beta This commit looks good
Details
This commit is contained in:
parent
bf449548c9
commit
93c481aadf
|
@ -250,6 +250,11 @@ export const useUserStore = defineStore('user', () => {
|
||||||
try {
|
try {
|
||||||
const userData = await api.get('VnUsers/getCurrentUserData');
|
const userData = await api.get('VnUsers/getCurrentUserData');
|
||||||
|
|
||||||
|
if (!userData?.data) {
|
||||||
|
console.error('GET VnUsers/getCurrentUserData returned invalid data', userData);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (userType === 'user') mainUser.value = userData.data;
|
if (userType === 'user') mainUser.value = userData.data;
|
||||||
else supplantedUser.value = userData.data;
|
else supplantedUser.value = userData.data;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
Loading…
Reference in New Issue