Schema Inaccuracy
The /repos/{owner}/{repo}/releases/latest endpoint returns a 404 if you call it against a repository that has no releases (e.g. a newly created repo). The documentation for this endpoint only lists 200 as a potential response code.
This data block is also returned in the event of a 404:
{
message: 'Not Found',
documentation_url: 'https://docs.github.com/rest/releases/releases#get-the-latest-release',
status: '404'
}
It's worth noting that the page that the documentation_url points to doesn't mention 404 response codes.
Expected
The documentation should list 404 as a possible response code.
Reproduction Steps
- Find a repo that has no releases against it, or create a brand new repo for the sake of testing.
- Call the endpoint (populate the
owner and repo path placeholders, and pass in an API token if the repo is private).
- Observe that a
404 response is returned.