Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upDocumenting error responses of REST API #194
Comments
|
Thanks for opening this issue. A GitHub docs team member should be by to give feedback soon. In the meantime, please check out the contributing guidelines. |
|
Thanks for letting us know @stmllr |
|
Thanks for opening this @stmllr! @imwiss and I have been chatting about improving some of the metadata around these responses, which would help us provide a better output in the documentation. I'd love to talk with you about that project and get your feedback -- would be curious to keep talking with you about that project if you're interested? |
|
sure @simpsoka |
What article on docs.github.com is affected?
Basically any REST API endpoint which returns HTTP 4xx responses
What part(s) of the article would you like to see updated?
The REST API documentation provides in depth description of responses for successful requests.
However things might not work as expected and then the API responds with HTTP errors. Some of them are predictable (4xx), some not (5xx).
For example, fetching a repository which is affected by DMCA takedown notice ends up with
HTTP 451 Unavailable for Legal ReasonsAdditional information
As GitHub App developer I would love to have predictable errors as part of the documentation
In order to gracefully handle some errors
When developing GitHub apps which consume REST API
Currently I create pull requests for octokit.rb whenever I identify a type of error which I need to handle. Having the errors documented would make this job much easier.