Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documenting error responses of REST API #194

Open
stmllr opened this issue Oct 7, 2020 · 4 comments
Open

Documenting error responses of REST API #194

stmllr opened this issue Oct 7, 2020 · 4 comments

Comments

@stmllr
Copy link

@stmllr stmllr commented Oct 7, 2020

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 Reasons

Additional 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.

@welcome
Copy link

@welcome welcome bot commented Oct 7, 2020

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.

@github-actions github-actions bot added the triage label Oct 7, 2020
@github-actions github-actions bot added this to Triage in Docs team reviews Oct 7, 2020
@janiceilene janiceilene moved this from Triage to Ecosystem in Docs team reviews Oct 7, 2020
@janiceilene janiceilene added content ecosystem and removed triage labels Oct 7, 2020
@janiceilene
Copy link
Contributor

@janiceilene janiceilene commented Oct 7, 2020

Thanks for letting us know @stmllr The @github/docs-content-ecosystem will take a look at this issue!

@simpsoka
Copy link
Contributor

@simpsoka simpsoka commented Oct 7, 2020

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?

@stmllr
Copy link
Author

@stmllr stmllr commented Oct 7, 2020

sure @simpsoka

@github github deleted a comment from hubot Oct 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.