From dd84834e784d24fd5dcab61740013224d9c8a157 Mon Sep 17 00:00:00 2001 From: Renan DelValle Date: Thu, 4 Oct 2018 10:31:10 -0700 Subject: [PATCH] Changing switch statement from fallthrough to list. --- retry.go | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/retry.go b/retry.go index c34922c..90cf55e 100644 --- a/retry.go +++ b/retry.go @@ -183,13 +183,10 @@ func (r *realisClient) thriftCallWithRetries(thriftCall auroraThriftCall) (*auro continue // Failure scenarios, these indicate a bad payload or a bad config. Stop retrying. - case aurora.ResponseCode_INVALID_REQUEST: - fallthrough - case aurora.ResponseCode_ERROR: - fallthrough - case aurora.ResponseCode_AUTH_FAILED: - fallthrough - case aurora.ResponseCode_JOB_UPDATING_ERROR: + case aurora.ResponseCode_INVALID_REQUEST, + aurora.ResponseCode_ERROR, + aurora.ResponseCode_AUTH_FAILED, + aurora.ResponseCode_JOB_UPDATING_ERROR: r.logger.Printf("Terminal Response Code %v from Aurora, won't retry\n", resp.GetResponseCode().String()) return resp, errors.New(response.CombineMessage(resp))