diff --git a/src/identity.ts b/src/identity.ts index 55234a1..112a12d 100644 --- a/src/identity.ts +++ b/src/identity.ts @@ -320,7 +320,7 @@ export class Contacts { const hash = parseNodeHash(channelHash) as number; const groups = this.groups[hash] || []; if (groups.length === 0) { - throw new Error("Unknown group hash"); + throw new Error(`Unknown group hash ${hash.toString(16).padStart(2, "0")}`); } for (const group of groups) { try { @@ -330,7 +330,7 @@ export class Contacts { // Ignore decryption errors and try the next group. } } - throw new Error("Decryption failed with all known groups"); + throw new Error(`Decryption failed with all known groups with hash ${hash.toString(16).padStart(2, "0")}`); } public decryptGroupData( @@ -344,7 +344,7 @@ export class Contacts { const hash = parseNodeHash(channelHash) as number; const groups = this.groups[hash] || []; if (groups.length === 0) { - throw new Error("Unknown group hash"); + throw new Error(`Unknown group hash ${hash.toString(16).padStart(2, "0")}`); } for (const group of groups) { try { @@ -354,6 +354,6 @@ export class Contacts { // Ignore decryption errors and try the next group. } } - throw new Error("Decryption failed with all known groups"); + throw new Error(`Decryption failed with all known groups with hash ${hash.toString(16).padStart(2, "0")}`); } }