// IsContextCanceledErr checks if the error is context.Canceled or serviceerror.Canceled error
var canceledSvcErr *serviceerror.Canceled
return errors.Is(err, context.Canceled) ||
errors.As(err, &canceledSvcErr)
}
// IsServiceClientTransientError checks if the error is a transient error.