mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-01-11 22:07:30 -08:00
improve error messages
This commit is contained in:
parent
81e7e920de
commit
a99d25bf3c
|
@ -95,7 +95,7 @@ class Nostr extends NotificationProvider {
|
||||||
const { data } = senderDecodeResult;
|
const { data } = senderDecodeResult;
|
||||||
return data;
|
return data;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
throw new Error(`Failed to get private key: ${error.message}`);
|
throw new Error(`Failed to decode private key for sender ${sender}: ${error.message}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -114,10 +114,10 @@ class Nostr extends NotificationProvider {
|
||||||
if (type === "npub") {
|
if (type === "npub") {
|
||||||
publicKeys.push(data);
|
publicKeys.push(data);
|
||||||
} else {
|
} else {
|
||||||
throw new Error("not an npub");
|
throw new Error(`Recipient ${recipient} is not an npub`);
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
throw new Error(`Error decoding recipient: ${error}`);
|
throw new Error(`Error decoding recipient ${recipient}: ${error}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return publicKeys;
|
return publicKeys;
|
||||||
|
|
Loading…
Reference in a new issue