Adding "fork:true" in repositories search query, results in [422 Unprocessable Entity] error
- Dominant language
- Java
- Stars
- 307
- Forks
- 144
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 14
Description
I have this method and it works:
```
@Override
public List getReposNameByLogin(String login) throws GitHubServiceException
{
List repos = new LinkedList<>();
try
{
for (Repo repo : github.search().repos("user:" + login, "stars", Search.Order.DESC))
{
repos.add(repo.coordinates().repo());
}
}
catch (IOException e)
{
throw new GitHubServiceException(e);
}
return repos;
}
```
If I change the for line for this one, it fails:
```
for (Repo repo : github.search().repos("user:" + login+"+fork:true", "stars", Search.Order.DESC))
```
login variable value is "nilopc".
getting this error:
```
2015-07-13 03:11:36.444 INFO 1945 --- [nio-8080-exec-1] com.jcabi.http.request.BaseRequest : #fetch(GET api.github.com /search/repositories): [422 Unprocessable Entity] in 853ms
2015-07-13 03:11:36.454 ERROR 1945 --- [nio-8080-exec-1] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Handler processing failed; nested exception is java.lang.AssertionError: HTTP response status is not equal to 200:
com.jcabi.github.RtSearchPagination$Hidden@7b26d4a8
Expected: HTTP response with status 200
but: was ] with root cause
java.lang.AssertionError: HTTP response status is not equal to 200:
com.jcabi.github.RtSearchPagination$Hidden@7b26d4a8
Expected: HTTP response with status 200
but: was
at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20)
at com.jcabi.http.response.RestResponse.assertStatus(RestResponse.java:117)
at com.jcabi.github.RtValuePagination$Items.fetch(RtValuePagination.java:199)
at com.jcabi.github.RtValuePagination$Items.hasNext(RtValuePagination.java:185)
....
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.