mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 17:13:51 +00:00
maxapi: fix dump request error check
This commit is contained in:
parent
48c84824cf
commit
16e5e08d58
|
@ -269,12 +269,12 @@ func (c *RestClient) newAuthenticatedRequest(m string, refURL string, data inter
|
|||
req.Header.Add("X-MAX-SIGNATURE", signPayload(encoded, c.APISecret))
|
||||
|
||||
if debugRequestDump {
|
||||
dump, err := httputil.DumpRequestOut(req, true)
|
||||
if err != nil {
|
||||
log.Panic(err)
|
||||
dump, err2 := httputil.DumpRequestOut(req, true)
|
||||
if err2 != nil {
|
||||
log.Errorf("dump request error: %v", err2)
|
||||
} else {
|
||||
fmt.Printf("REQUEST:\n%s", dump)
|
||||
}
|
||||
|
||||
fmt.Printf("REQUEST:\n%s", dump)
|
||||
}
|
||||
|
||||
return req, nil
|
||||
|
|
Loading…
Reference in New Issue
Block a user