MCPcopy Create free account
hub / github.com/Permify/permify / isContextError

Function isContextError

internal/engines/bulk.go:595–597  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

593// Returns:
594// - bool: True if the error is context-related, false otherwise
595func 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

Callers 4

ExecuteRequestsMethod · 0.85
processRequestMethod · 0.85
IsContextRelatedErrorFunction · 0.85
bulk_test.goFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected