Skip to content

Getting a lot of 409 Conflict errors in response and the error message is unclear #1787

@lumichael24

Description

@lumichael24

contents = repo.get_contents(path, ref="master")
repo.update_file(contents.path, "commit msg", "contents", contents.sha, branch="master")

Exception thrown from update_file:
409 {"message": "is at 0929670cc804228df5f0b3e8f7a741dfb735ba62 but expected c45b5444e7ae45df5356ca2b8dbf49db646826d4", "documentation_url": "https://developer.github.com/enterprise/2.20/v3/repos/contents/#create-or-update-a-file"}

This happens when we're sending many requests for many different files at the same time but with different Github instance objects. Is there a maximum number of connections that we have with the Github api? Or what does this error mean?

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