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

Most GH error bodies are returned as JsonProcessingException. #394

Closed
kalexmills opened this issue Mar 27, 2020 · 4 comments
Closed

Most GH error bodies are returned as JsonProcessingException. #394

kalexmills opened this issue Mar 27, 2020 · 4 comments

Comments

@kalexmills
Copy link
Contributor

Right now we're not making any attempt to read the JSON response bodies returned by GitHub on an error. This means legitimate errors returned by GitHub are coming through as JsonProcessingExceptions.

Seems like an extra domain model or two along with some different logic in the run method in HttpClient would suffice to making a cleaner unhappy path.

Related to #363

@BenFradet
Copy link
Contributor

I was planning on doing exactly that, the whole error hierarchy needs redoing too.

I was thinking we'd need at least a couple:

  • Unauthorized
  • RateLimitExceeded

@kalexmills
Copy link
Contributor Author

At that link, it looks like GH also has standard domain errors we could lift into exceptions by checking under the "code" field, things like

  • MissingResource
  • MissingField
  • InvalidFormatting
  • ResourceAlreadyExists

@BenFradet
Copy link
Contributor

created #440

@BenFradet
Copy link
Contributor

done in #440

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants