11package org .kohsuke .github ;
22
3+ import org .kohsuke .github .connector .GitHubConnectorResponse ;
4+
35import java .io .IOException ;
46import java .io .InterruptedIOException ;
57import java .net .HttpURLConnection ;
@@ -22,7 +24,7 @@ public abstract class AbuseLimitHandler {
2224 * an exception. If this method returns normally, another request will be attempted. For that to make sense, the
2325 * implementation needs to wait for some time.
2426 *
25- * @param responseInfo
27+ * @param connectorResponse
2628 * Response information for this request.
2729 * @throws IOException
2830 * on failure
@@ -32,12 +34,12 @@ public abstract class AbuseLimitHandler {
3234 * with abuse rate limits</a>
3335 *
3436 */
35- void onError (GitHubResponse . ResponseInfo responseInfo ) throws IOException {
37+ void onError (GitHubConnectorResponse connectorResponse ) throws IOException {
3638 GHIOException e = new HttpException ("Abuse limit violation" ,
37- responseInfo .statusCode (),
38- responseInfo .header ("Status" ),
39- responseInfo .url ().toString ()).withResponseHeaderFields (responseInfo .allHeaders ());
40- onError (e , new GitHubResponseInfoHttpURLConnectionAdapter (responseInfo ));
39+ connectorResponse .statusCode (),
40+ connectorResponse .header ("Status" ),
41+ connectorResponse .url ().toString ()).withResponseHeaderFields (connectorResponse .allHeaders ());
42+ onError (e , new GitHubResponseInfoHttpURLConnectionAdapter (connectorResponse ));
4143 }
4244
4345 /**
0 commit comments