Skip to content
This repository was archived by the owner on Mar 31, 2025. It is now read-only.

fix: don't fail when reading a repo that doesn't exist #131

Merged
merged 1 commit into from
Mar 24, 2025

Conversation

marcoieni
Copy link
Member

No description provided.

@Kobzol Kobzol added the backport This repo should be backported to team. label Mar 24, 2025
Copy link
Contributor

@Kobzol Kobzol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will mark newly merged sync-team PRs with the backport label, so that we know that we should later backport them to team.

@marcoieni
Copy link
Member Author

this is the actual response from github when the repository doesn't exist

{
  "data": {
    "repository": null
  },
  "errors": [
    {
      "type": "NOT_FOUND",
      "path": [
        "repository"
      ],
      "locations": [
        {
          "line": 2,
          "column": 17
        }
      ],
      "message": "Could not resolve to a Repository with the name 'rust-lang/aaa'."
    }
  ]
}

@Kobzol
Copy link
Contributor

Kobzol commented Mar 24, 2025

I guess that we could detect either null repository or the NOT_FOUND error type (that might be more robust). Or we can do a REST query first to find our if the repo exists or not xD

@marcoieni marcoieni changed the title chore: improve repo read error message fix: don't fail when reading a repo when it doesn't exist Mar 24, 2025
@marcoieni marcoieni force-pushed the chore-improve-repo-read-error-message branch from 08cfdf3 to 1607e84 Compare March 24, 2025 16:47
@marcoieni marcoieni changed the title fix: don't fail when reading a repo when it doesn't exist fix: don't fail when reading a repo that doesn't exist Mar 24, 2025
@marcoieni marcoieni force-pushed the chore-improve-repo-read-error-message branch from 1607e84 to 0197220 Compare March 24, 2025 16:47
@marcoieni marcoieni force-pushed the chore-improve-repo-read-error-message branch from 0197220 to 23c7a2f Compare March 24, 2025 16:50
@marcoieni marcoieni requested a review from Kobzol March 24, 2025 16:55
Copy link
Contributor

@Kobzol Kobzol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks!

@marcoieni marcoieni added this pull request to the merge queue Mar 24, 2025
Merged via the queue into master with commit 3fc73d0 Mar 24, 2025
4 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport This repo should be backported to team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants