MG: add trace logging for decoded API responses (#28790)
This commit is contained in:
parent
59c49e7ce1
commit
72e6e2cbcf
1 changed files with 2 additions and 0 deletions
|
|
@ -127,6 +127,8 @@ func doRequest[T any](v *API, req *http.Request, result *requests.Answer[T]) (st
|
|||
return event_id, fmt.Errorf("decrypt: %w", err2)
|
||||
}
|
||||
|
||||
v.log.TRACE.Printf("recv: %s", body)
|
||||
|
||||
if err2 := json.Unmarshal(body, result); err2 == nil && result.Code != 0 {
|
||||
if result.Code == 4 {
|
||||
err = api.ErrMustRetry
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue