isContextError checks if an error is related to context cancellation or timeout. This helper function centralizes the logic for identifying context-related errors that should not be treated as actual errors in the bulk processing system. Parameters: - err: The error to check Returns: - bool: True
(err error)
| 593 | // Returns: |
| 594 | // - bool: True if the error is context-related, false otherwise |
| 595 | func isContextError(err error) bool { |
| 596 | return errors.Is(err, context.Canceled) || errors.Is(err, context.DeadlineExceeded) |
| 597 | } |
| 598 | |
| 599 | // IsContextRelatedError is a legacy function maintained for backward compatibility. |
| 600 | // This function provides the same functionality as isContextError but with |
no outgoing calls
no test coverage detected