From fff345c6953f8cf95b3ab4bbcd5788012c039298 Mon Sep 17 00:00:00 2001 From: miyuko Date: Mon, 17 Nov 2025 11:08:35 +0000 Subject: [PATCH] Don't observe context cancellation errors. --- src/observe.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/observe.go b/src/observe.go index 38cc413..8f05cb9 100644 --- a/src/observe.go +++ b/src/observe.go @@ -2,6 +2,7 @@ package git_pages import ( "context" + "errors" "fmt" "io" "log" @@ -131,6 +132,12 @@ func FiniObservability() { } func ObserveError(err error) { + if errors.Is(err, context.Canceled) { + // Something has explicitly requested cancellation. + // Timeout results in a different error. + return + } + if hasSentry() { sentry.CaptureException(err) }