Skip to content

Commit

Permalink
polish 0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
infiloop2 committed Feb 19, 2024
1 parent 496e0e9 commit e97962e
Showing 1 changed file with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,17 +108,17 @@ func (c *client) DoRequest(ctx context.Context, streamsLookup *mercury.StreamsLo
}
// If errors were retryable then calculate retry interval
retryInterval := mercury.CalculateRetryConfigFn(pluginRetryKey, c.mercuryConfig)
if retryInterval == mercury.RetryIntervalTimeout {
// If we have exhausted all retries and we have an error code to expose to user expose it with noPipelineError
// otherwise expose the last pipeline error to pipeline runner (not the user)
if errCode != encoding.ErrCodeNil {
return encoding.NoPipelineError, nil, errCode, false, 0 * time.Second, nil
}
return state, nil, errCode, false, 0 * time.Second, reqErr
if retryInterval != mercury.RetryIntervalTimeout {
// Return the retyrable state with appropriate retry interval
return state, nil, errCode, retryable, retryInterval, reqErr
}

// Return the retyrable state with appropriate retry interval
return state, nil, errCode, retryable, retryInterval, reqErr
// Now we have exhausted all retries and we have an error code to expose to user expose it with noPipelineError
// otherwise expose the last pipeline error to pipeline runner (not the user)
if errCode != encoding.ErrCodeNil {
return encoding.NoPipelineError, nil, errCode, false, 0 * time.Second, nil
}
return state, nil, errCode, false, 0 * time.Second, reqErr
}

// All feeds faced no pipeline error
Expand Down

0 comments on commit e97962e

Please sign in to comment.