From 56316d36d38bfa52b89070a3752ca12a51695426 Mon Sep 17 00:00:00 2001 From: Awiteb Date: Mon, 19 May 2025 20:02:53 +0000 Subject: [PATCH] chore: Add events errors Signed-off-by: Awiteb --- src/error.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/error.rs b/src/error.rs index d0df486..1445a66 100644 --- a/src/error.rs +++ b/src/error.rs @@ -38,10 +38,19 @@ pub enum N34Error { EventBuilder(#[from] EventBuilderError), #[error("Invalid repository id, it can't be empty and must be kebab-case")] InvalidRepoId, + #[error("Invalid event: {0}")] + InvalidEvent(String), #[error("Bech32 error: {0}")] Bech32(#[from] nostr::nips::nip19::Error), #[error("Event error: {0}")] Event(#[from] nostr::event::Error), + #[error("Event not found in the specified relays")] + EventNotFound, + #[error( + "Can't reply to this event. Only Git issues, patches, and their comments can be replied \ + to." + )] + CanNotReplyToEvent, } impl N34Error {