From 3a306417f7e5f8187da63aae0cfb2915dba4a090 Mon Sep 17 00:00:00 2001 From: itsjunetime Date: Mon, 18 Dec 2023 22:55:11 -0700 Subject: [PATCH] Return error if failed to load Rss from file to prevent overriding of URLs --- internal/backend/backend.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/backend/backend.go b/internal/backend/backend.go index 9dac106..661861a 100644 --- a/internal/backend/backend.go +++ b/internal/backend/backend.go @@ -51,6 +51,7 @@ func New(urlPath, cacheDir string, resetCache bool) (*Backend, error) { if err = rss.Load(); err != nil { log.Println("Rss load failed: ", err) + return nil, fmt.Errorf("backend.New: %w", err) } return &Backend{rss, store, readStatus}, nil