Don't observe context cancellation errors.

This commit is contained in:
miyuko
2025-11-17 11:08:35 +00:00
parent de17426f41
commit fff345c695

View File

@@ -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)
}