Skip to content

Commit

Permalink
docs: add comment explaining handling of 409 conflict error (#577)
Browse files Browse the repository at this point in the history
  • Loading branch information
gr2m committed Nov 15, 2023
1 parent 4d23d53 commit 73f280d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/iterator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ export function iterator(

return { value: normalizedResponse };
} catch (error: any) {
// `GET /repos/{owner}/{repo}/commits` throws a `409 Conflict` error for empty repositories
// See https://github.com/github/rest-api-description/issues/385
if (error.status !== 409) throw error;

url = "";
Expand Down

0 comments on commit 73f280d

Please sign in to comment.