MG: add trace logging for decoded API responses (#28790)

This commit is contained in:
andig 2026-04-03 15:20:23 +02:00 • committed by GitHub
parent 59c49e7ce1
commit 72e6e2cbcf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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