From 129c8fc55a6b98e644da2b3a5f801cac42c2487a Mon Sep 17 00:00:00 2001 From: asmogo Date: Sun, 1 Sep 2024 21:31:49 +0200 Subject: [PATCH] update error handling (#41) --- 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 {