From bedd0c5ec632dde13075052c45d0dfc6173eb1a7 Mon Sep 17 00:00:00 2001 From: dd dd Date: Sun, 1 Sep 2024 21:30:09 +0200 Subject: [PATCH] improve error handling and messaging --- exit/exit.go | 2 +- exit/nostr.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/exit/exit.go b/exit/exit.go index 3124c13..77e95ed 100644 --- a/exit/exit.go +++ b/exit/exit.go @@ -119,7 +119,7 @@ func NewExit(ctx context.Context, exitNodeConfig *config.ExitConfig) *Exit { } err = exit.announceExitNode(ctx) if err != nil { - panic(err) + slog.Error("failed to announce exit node", "error", err) } return exit } diff --git a/exit/nostr.go b/exit/nostr.go index a819de1..e3e0f0b 100644 --- a/exit/nostr.go +++ b/exit/nostr.go @@ -14,7 +14,7 @@ import ( const ten = 10 -var errNoPublicKey = errors.New("no public key found") +var errNoPublicKey = errors.New("no public configuration") func (e *Exit) announceExitNode(ctx context.Context) error { if !e.config.Public {