From 05cb97d41249b55779077a506b55065127c0be8b Mon Sep 17 00:00:00 2001 From: Andre Medeiros Date: Thu, 30 Jun 2022 12:11:07 -0400 Subject: [PATCH] be more specific about errors --- internal/api/watcher.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/api/watcher.go b/internal/api/watcher.go index 6109cc1..f96e093 100644 --- a/internal/api/watcher.go +++ b/internal/api/watcher.go @@ -257,6 +257,7 @@ func (a *api) editWatcherHandler(w http.ResponseWriter, r *http.Request) { if err != nil { switch err { case reddit.ErrSubredditIsPrivate, reddit.ErrSubredditIsQuarantined: + err = fmt.Errorf("error watching %s: %w", lsr, err) a.errorResponse(w, r, 403, err) default: a.errorResponse(w, r, 422, err)