From b001a51a30d4ae14909ce6157c6d85e80eba2fe5 Mon Sep 17 00:00:00 2001 From: Andre Medeiros Date: Sat, 7 May 2022 13:38:23 -0400 Subject: [PATCH] return after error --- internal/api/watcher.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/api/watcher.go b/internal/api/watcher.go index 0aa8105..5edff5d 100644 --- a/internal/api/watcher.go +++ b/internal/api/watcher.go @@ -77,6 +77,7 @@ func (a *api) createWatcherHandler(w http.ResponseWriter, r *http.Request) { if len(accs) == 0 { a.errorResponse(w, r, 422, "can't create watchers without accounts") + return } account := accs[0]