Skip to content

Commit 66f2062

Browse files
authored
Skip flow error handling on context canceled/deadline exceeded (#4064)
1 parent cb7746a commit 66f2062

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

flow/alerting/alerting.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -475,6 +475,11 @@ func (a *Alerter) recordFlowErrorInternal(
475475
slog.String("flowErrorType", errorType.String()),
476476
)
477477

478+
if ctx.Err() != nil {
479+
logger.Error("Skipping flow error handling: " + ctx.Err().Error())
480+
return
481+
}
482+
478483
// 2. Insert log to flow_errors table
479484
if err := InsertFlowLog(ctx, a.CatalogPool, flowName, errMessage, errorType); err != nil {
480485
logger.Error("failed to insert flow error", slog.Any("error", err))

0 commit comments

Comments
 (0)