From a26116702d42ba71e647e050c74b839bc0650041 Mon Sep 17 00:00:00 2001
From: Awiteb
Date: Thu, 22 May 2025 20:44:41 +0000
Subject: [PATCH] chore: Errors to work with the `nostr-address` file
Signed-off-by: Awiteb
---
src/error.rs | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/error.rs b/src/error.rs
index 1445a66..9676476 100644
--- a/src/error.rs
+++ b/src/error.rs
@@ -51,6 +51,15 @@ pub enum N34Error {
to."
)]
CanNotReplyToEvent,
+ #[error("No repository address given and couldn't read `nostr-address` file: {0}")]
+ CanNotReadNostrAddressFile(std::io::Error),
+ #[error(
+ "The `nostr-address` file is empty. Please add a valid Nostr repository address (naddr) \
+ to the file or provide it manually as a flag."
+ )]
+ EmptyNostrAddressFile,
+ #[error("Invalid `nostr-address` file content: {0}")]
+ InvalidNostrAddressFileContent(String),
}
impl N34Error {