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

[DOCS]: Error response schema #545

Open
1 task done
markcellus opened this issue Jan 18, 2023 · 3 comments
Open
1 task done

[DOCS]: Error response schema #545

markcellus opened this issue Jan 18, 2023 · 3 comments
Labels
hacktoberfest Issues for participation in Hacktoberfest Status: Up for grabs Issues that are ready to be worked on by anyone Type: Documentation Improvements or additions to documentation

Comments

@markcellus
Copy link

Describe the need

I realize the package is just likely returning what comes from the official REST API, but can the schema for a response error be documented? I'm trying to ensure my code knows how to handle the different error responses.

I'm able to deduce that each error response has a status property, but that's all that the Github REST API seems to indicate. I'm sure there are other properties besides status because I'm seeing other things like code, message, headers, etc. Are these documented somewhere? If so, can the README be updated to point to it? If not, it would be great if it can be added.

Thanks in advance.

SDK Version

No response

API Version

No response

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@markcellus markcellus added Status: Triage This is being looked at and prioritized Type: Documentation Improvements or additions to documentation labels Jan 18, 2023
@kfcampbell kfcampbell added Priority: Normal Status: Up for grabs Issues that are ready to be worked on by anyone and removed Status: Triage This is being looked at and prioritized labels Jan 18, 2023
@wolfy1339
Copy link
Member

Errors from requests are implemented in @octokit/request-error
The documentation you want is probably there already

@markcellus
Copy link
Author

Thanks this is helpful. Unfortunately its not clear that one would need to navigate to another package to learn about errors raised in this package, without digging into the codebase.

Is it possible to just add a sentence on the README that links to that? I'd be willing to open a PR for this if that would help.

@wolfy1339
Copy link
Member

Of course, PRs are welcome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hacktoberfest Issues for participation in Hacktoberfest Status: Up for grabs Issues that are ready to be worked on by anyone Type: Documentation Improvements or additions to documentation
Projects
Status: 🔥 Backlog
Development

No branches or pull requests

4 participants