Searching for user's repositories leads to "Unprocessable Entity" failure #24572
-
I’m trying to get the public repositories of a given Github user using the repository Search API. For some of the users it works properly, but for some I receive the following:
For example, the following query will trigger the error: https://api.github.com/search/repositories?q=user:ironshay Going via the web UI (https://github.com/ironshay?tab=repositories) leads to a message that the user has no public repositories, which is what I expected the search API to return as well. Can you please provide details regarding this error and why it happens? Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
For whoever is interested in this, it seems that this error can appear if you search for a user that has only private repositories and no public repositories whatsoever. So as I understand, you have several response options:
|
Beta Was this translation helpful? Give feedback.
For whoever is interested in this, it seems that this error can appear if you search for a user that has only private repositories and no public repositories whatsoever.
So as I understand, you have several response options:
User has no private repositories - you will receive a response with his public repositories.
User has private repositories and public repositories - you will receive a response with his public repositories.
User has only private repositories - you will receive this “Validation failed” error.
More details here