From e323fb089f608d18c7e4697e80e3009cc96f01a6 Mon Sep 17 00:00:00 2001 From: MacRat Date: Sun, 4 Dec 2022 01:36:45 +0900 Subject: [PATCH] fix(endpoint): add error handler for log.html endpoint --- internal/endpoint/log.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/endpoint/log.go b/internal/endpoint/log.go index be28167c..de3514db 100644 --- a/internal/endpoint/log.go +++ b/internal/endpoint/log.go @@ -298,6 +298,7 @@ func LogHTMLEndpoint(s Store) http.HandlerFunc { scanner, err := s.OpenLog(since, until) if err != nil { + handleError(s, "log.html", fmt.Errorf("failed to open log: %w", err)) w.WriteHeader(http.StatusInternalServerError) w.Write([]byte(err.Error() + "\n")) return