throwing the error message if it exists on the Error object

This commit is contained in:
Andre Rosado 2024-05-17 16:46:31 +01:00
parent cb04684d36
commit 7d68969abc
No known key found for this signature in database
GPG Key ID: 99F68267CCD45AA9
1 changed files with 8 additions and 4 deletions

View File

@ -241,8 +241,10 @@ export class Parser {
account.isFavorite = isFavorite;
account.isShared = folder != null;
return account;
} catch {
throw new Error("Error parsing accounts on item with ID:" + id);
} catch (err) {
throw new Error(
"Error parsing accounts on item with ID:" + id + " errorMessage: " + err.message,
);
}
}
@ -278,8 +280,10 @@ export class Parser {
folder.name = name;
folder.encryptionKey = key;
return folder;
} catch (error) {
throw new Error("Error parsing shared folder with ID:" + id);
} catch (err) {
throw new Error(
"Error parsing shared folder with ID:" + id + " errorMessage: " + err.message,
);
}
}