Skip to content

Commit

Permalink
fix(endpoint): add error handler for log.html endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
macrat committed Dec 3, 2022
1 parent 1fdb915 commit e323fb0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions internal/endpoint/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e323fb0

Please sign in to comment.