File tree Expand file tree Collapse file tree 1 file changed +0
-23
lines changed
Expand file tree Collapse file tree 1 file changed +0
-23
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,6 @@ import (
1111 "strings"
1212
1313 "github.com/elastic/go-elasticsearch/v7/esapi"
14- "github.com/multiversx/mx-chain-es-indexer-go/data"
1514 "github.com/multiversx/mx-chain-es-indexer-go/process/dataindexer"
1615)
1716
@@ -194,28 +193,6 @@ func isErrAliasAlreadyExists(response map[string]interface{}) bool {
194193 return existsString == aliasExistsMessage
195194}
196195
197- func kibanaResponseErrorHandler (res * esapi.Response ) error {
198- errorRes := & data.Response {}
199- decodeErr := loadResponseBody (res .Body , errorRes )
200- if decodeErr != nil {
201- return decodeErr
202- }
203-
204- errStr := fmt .Sprintf ("%v" , errorRes .Error )
205- if errorRes .Status == http .StatusConflict && strings .Contains (errStr , errPolicyAlreadyExists ) {
206- return nil
207- }
208-
209- if errorRes .Error == nil && errorRes .Status < http .StatusBadRequest {
210- return nil
211- }
212-
213- log .Warn ("elasticClient.parseResponse" ,
214- "error returned by elastic API" , errorRes .Error ,
215- "code" , res .StatusCode )
216- return dataindexer .ErrBackOff
217- }
218-
219196func newRequest (method , path string , body * bytes.Buffer ) * http.Request {
220197 r := http.Request {
221198 Method : method ,
You can’t perform that action at this time.
0 commit comments