Skip to content

Documenting error responses of REST API #194

@stmllr

Description

@stmllr

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    contentThis issue or pull request belongs to the Docs Content teamecosystemThis issue or pull request should be reviewed by the Docs Ecosystem team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions