ServerError
Thrown on 5xx responses, or with statusCode = -1 for network-level failures (timeout, no connectivity, etc.).
KHttpConfig.onServerError is always invoked before this is thrown.
Parameters
statusCode
HTTP status code (500–599), or -1 for network errors.
message
Error detail parsed from the response body, or the exception message for network errors.