Skip to content

Add innerException overloads to the hosting exception hierarchy #83

Description

@matt-edmondson

GitHostingException and its four subtypes have no constructor taking an inner exception, so GitHubProvider.Translate discards the Octokit exception it translates. That loses ApiError.Errors, which is often the only place GitHub explains what was actually wrong with a request.

The worst case is Octokit's synthetic 404, which carries no HttpResponse. ResponseBody is empty and the inner exception is dropped, so that failure reaches the caller carrying only a message.

The hierarchy already carries the provider name, status code, and response body, which covers reproducing a failure by hand. This is about preserving detail the host supplied.

Found during the Phase 5b final review (#80). Worth doing before the next hosting phase, so the pattern is not copied into a third provider.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions