Package com.mixpanel.android.util
Interface MixpanelNetworkErrorListener
public interface MixpanelNetworkErrorListener
-
Method Summary
Modifier and TypeMethodDescriptionvoid
onNetworkError
(String endpointUrl, String ipAddress, long durationMillis, long uncompressedBodySize, long compressedBodySize, int responseCode, String responseMessage, Exception exception) Called when a network request within the Mixpanel SDK fails.
-
Method Details
-
onNetworkError
void onNetworkError(String endpointUrl, String ipAddress, long durationMillis, long uncompressedBodySize, long compressedBodySize, int responseCode, String responseMessage, Exception exception) Called when a network request within the Mixpanel SDK fails. This method may be called on a background thread.- Parameters:
endpointUrl
- The URL that failed.ipAddress
- The IP address resolved from the endpointUrl's hostname for this attempt (may be "N/A" if DNS lookup failed).durationMillis
- The approximate duration in milliseconds from the start of this specific connection attempt until the exception was thrown.uncompressedBodySize
- The size in bytes of the request body *before* any compression. Will be -1 if no body was sent.compressedBodySize
- The size in bytes of the request body *after* Gzip compression. Will be -1 if no body was sent or if compression was not enabled (in which case uncompressed size applies).responseCode
- The HTTP response code returned by the server, if available. Defaults to -1 if no response code could be retrieved (e.g., connection error).responseMessage
- The HTTP response message returned by the server, if available. Defaults to empty string if no response message could be retrieved.exception
- The exception that occurred (e.g., IOException, EOFException, etc.).
-