From 480481afee1dbbf26decfe50b723c371d7935382 Mon Sep 17 00:00:00 2001 From: Aaron Bieber Date: Thu, 30 Apr 2020 06:16:50 -0600 Subject: [PATCH] return errors instead of panicing --- cmd/cromps/handlers.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/cromps/handlers.go b/cmd/cromps/handlers.go index c31c4e8..87bd0ec 100644 --- a/cmd/cromps/handlers.go +++ b/cmd/cromps/handlers.go @@ -29,7 +29,8 @@ func Auth(w http.ResponseWriter, r *http.Request) { user, err := base.AuthUser(ctx, p) if err != nil { - panic(err) + http.Error(w, err.Error(), http.StatusInternalServerError) + return } if user.Authed {