Skip to content

Commit 0a8878b

Browse files
Support status codes 302 and 200 in GetArchiveLink endpoint (#3172)
Fixes: #3171.
1 parent 4b16015 commit 0a8878b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

github/repos_contents.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ func (s *RepositoriesService) GetArchiveLink(ctx context.Context, owner, repo st
346346
}
347347
defer resp.Body.Close()
348348

349-
if resp.StatusCode != http.StatusFound {
349+
if resp.StatusCode != http.StatusOK && resp.StatusCode != http.StatusFound {
350350
return nil, newResponse(resp), fmt.Errorf("unexpected status code: %s", resp.Status)
351351
}
352352

0 commit comments

Comments
 (0)