mirror of
https://github.com/lukaszraczylo/go-simple-graphql.git
synced 2026-10-14 00:58:32 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3cda8e267b
|
||
|
|
1393f4d7cf
|
@@ -79,7 +79,7 @@ func (g *GraphQL) Query(queryContent string, queryVariables interface{}, queryHe
|
||||
g.Log.Error("Unable to send the query", map[string]interface{}{"_error": err.Error()})
|
||||
return err
|
||||
}
|
||||
if httpResponse.StatusCode >= 200 && httpResponse.StatusCode <= 204 {
|
||||
if httpResponse.StatusCode <= 200 && httpResponse.StatusCode >= 204 {
|
||||
return errors.New(fmt.Sprintf("%v", httpResponse.StatusCode))
|
||||
}
|
||||
return nil
|
||||
@@ -87,7 +87,7 @@ func (g *GraphQL) Query(queryContent string, queryVariables interface{}, queryHe
|
||||
retry.Attempts(uint(g.RetriesNumber)),
|
||||
retry.OnRetry(
|
||||
func(n uint, err error) {
|
||||
g.Log.Warning("Retrying the query", map[string]interface{}{"_attempt": n, "_error": err.Error()})
|
||||
g.Log.Debug("Retrying the query", map[string]interface{}{"_attempt": n, "_error": err.Error()})
|
||||
time.Sleep(time.Duration(g.RetriesDelay) * time.Millisecond)
|
||||
},
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user