We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6de976c commit eaf0d7dCopy full SHA for eaf0d7d
github/git_refs.go
@@ -69,7 +69,7 @@ func (s *GitService) GetRef(ctx context.Context, owner string, repo string, ref
69
if _, ok := err.(*json.UnmarshalTypeError); ok {
70
// Multiple refs, means there wasn't an exact match.
71
return nil, resp, errors.New("multiple matches found for this ref")
72
- } else if resp.StatusCode == 404 {
+ } else if _, ok := err.(*ErrorResponse); ok && resp.StatusCode == 404 {
73
// No ref, there was no match for the ref
74
return nil, resp, errors.New("no match found for this ref")
75
} else if err != nil {
0 commit comments