Skip to content
This repository was archived by the owner on Jan 27, 2026. It is now read-only.

Commit 2f12f42

Browse files
author
Gabor Szabad
committed
Add more details to the sending error log
1 parent a6165d1 commit 2f12f42

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

mixpanel.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,8 @@ func (m *mixpanel) send(eventType string, params interface{}, autoGeolocate bool
228228
json.Unmarshal(body, &jsonBody)
229229

230230
if jsonBody.Status != 1 {
231-
return wrapErr(&ErrTrackFailed{Message: jsonBody.Error})
231+
errMsg := fmt.Sprintf("error=%s; status=%d; httpCode=%d", jsonBody.Error, jsonBody.Status, resp.StatusCode)
232+
return wrapErr(&ErrTrackFailed{Message: errMsg})
232233
}
233234

234235
return nil

0 commit comments

Comments
 (0)