- **fix(errors):** ensure proper error handling with errors.Is instead of direct comparison for http.ErrServerClosed
Some checks failed
CI / build-test (push) Successful in 1m4s
CI / docker (push) Failing after 2s

- **fix(sql):** wrap `rows.Close` in a `defer` function to safely handle potential close errors
- **fix(api):** handle JSON encoding errors in API responses to prevent unhandled edge cases
- **docs:** correct typos and improve phrasing in `.claude/CLAUDE.md`
- **test:** add error handling for `UpdateEvent` in test cases
This commit is contained in:
2026-02-25 20:44:18 +01:00
parent 6094edc5c8
commit 1983a3bed9
4 changed files with 45 additions and 13 deletions

View File

@@ -2,6 +2,7 @@ package main
import (
"context"
"errors"
"log"
"net/http"
"os"
@@ -44,7 +45,7 @@ func main() {
go func() {
log.Printf("Listening on :%s", port)
if err := srv.ListenAndServe(); err != nil && err != http.ErrServerClosed {
if err := srv.ListenAndServe(); err != nil && !errors.Is(err, http.ErrServerClosed) {
log.Fatalf("ListenAndServe: %v", err)
}
}()