mirror of
https://github.com/jlengrand/github-api.git
synced 2026-04-05 08:21:21 +00:00
Provide more exception details
For now if invalid credentials used to search github-api throws following exception
Exception in thread "main" org.kohsuke.github.GHException: Failed to retrieve https://api.github.com/search/repositories?q=vk+language%3Ajava+created%3A2015-11-26..2016-11-26
at org.kohsuke.github.Requester$PagingIterator.fetch(Requester.java:529)
at org.kohsuke.github.Requester$PagingIterator.hasNext(Requester.java:494)
at org.kohsuke.github.PagedSearchIterable$1.hasNext(PagedSearchIterable.java:55)
at org.kohsuke.github.PagedIterator.fetch(PagedIterator.java:44)
at org.kohsuke.github.PagedIterator.hasNext(PagedIterator.java:32)
There is no mentions if credentials at all. Better to propagate exception to user to be able to deal with it.
This commit is contained in:
@@ -526,7 +526,7 @@ class Requester {
|
||||
}
|
||||
}
|
||||
} catch (IOException e) {
|
||||
throw new GHException("Failed to retrieve "+url);
|
||||
throw new GHException("Failed to retrieve " + url, e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user