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.
GitHostingExceptionand its four subtypes have no constructor taking an inner exception, soGitHubProvider.Translatediscards the Octokit exception it translates. That losesApiError.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.ResponseBodyis 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.