From f449ba0af913a918bac5656b5bf9f084483043fd Mon Sep 17 00:00:00 2001 From: David Dworken Date: Thu, 21 Dec 2023 17:05:21 -0800 Subject: [PATCH] Revert "Remove colon so that this doesn't match against gotestsum looking for the substring "panic:", which can happen depending on how stdout is buffer" This reverts commit b44e53a17bb1592e620e77e39b7dab93e8edafcf. --- backend/server/internal/server/middleware.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/server/internal/server/middleware.go b/backend/server/internal/server/middleware.go index a733397..3564d6c 100644 --- a/backend/server/internal/server/middleware.go +++ b/backend/server/internal/server/middleware.go @@ -113,7 +113,7 @@ func withPanicGuard(s *statsd.Client) Middleware { return http.HandlerFunc(func(rw http.ResponseWriter, r *http.Request) { defer func() { if r := recover(); r != nil { - fmt.Printf("caught panic %s\n", r) + fmt.Printf("caught panic: %s\n", r) if s != nil { s.Incr("hishtory.error", []string{"handler:" + getFunctionName(h)}, 1.0) }