Eliminating deprecated response code check since retry call does this automatically.
This commit is contained in:
parent
d747a48626
commit
848b5f7971
1 changed files with 0 additions and 13 deletions
|
@ -17,7 +17,6 @@ package response
|
|||
|
||||
import (
|
||||
"bytes"
|
||||
"errors"
|
||||
|
||||
"github.com/paypal/gorealis/gen-go/apache/aurora"
|
||||
)
|
||||
|
@ -39,18 +38,6 @@ func JobUpdateSummaries(resp *aurora.Response) []*aurora.JobUpdateSummary {
|
|||
return resp.GetResult_().GetGetJobUpdateSummariesResult_().GetUpdateSummaries()
|
||||
}
|
||||
|
||||
// Deprecated: Replaced by checks done inside of thriftCallHelper
|
||||
func ResponseCodeCheck(resp *aurora.Response) (*aurora.Response, error) {
|
||||
if resp == nil {
|
||||
return resp, errors.New("Response is nil")
|
||||
}
|
||||
if resp.GetResponseCode() != aurora.ResponseCode_OK {
|
||||
return resp, errors.New(CombineMessage(resp))
|
||||
}
|
||||
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
// Based on aurora client: src/main/python/apache/aurora/client/base.py
|
||||
func CombineMessage(resp *aurora.Response) string {
|
||||
var buffer bytes.Buffer
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue