Skip to content

Add error handling to GithubProviderClient.listVersions#104

Closed
Copilot wants to merge 3 commits into001-query-managementfrom
copilot/sub-pr-103
Closed

Add error handling to GithubProviderClient.listVersions#104
Copilot wants to merge 3 commits into001-query-managementfrom
copilot/sub-pr-103

Conversation

Copy link

Copilot AI commented Dec 31, 2025

Addresses feedback on #103 regarding unused status variable in GithubProviderClient.listVersions. The variable was initially removed, but code review revealed missing error handling compared to other provider clients.

Changes

  • Added HTTP status validation with ensureOk() to listVersions method
  • Aligns error handling with GitlabProviderClient and BitbucketProviderClient implementations
const { status, json } = await this.request<GithubCommit[]>(
  config,
  `/repos/${encodeURIComponent(owner)}/${encodeURIComponent(repo)}/commits?${qs.toString()}`,
);

this.ensureOk(status, "Failed to list query versions.");

Without this check, API errors would silently return empty version lists instead of throwing meaningful errors to the caller.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits December 31, 2025 22:54
Co-authored-by: MathiasVDA <15101339+MathiasVDA@users.noreply.github.com>
Co-authored-by: MathiasVDA <15101339+MathiasVDA@users.noreply.github.com>
Copilot AI changed the title [WIP] Update query management implementation based on review feedback Add error handling to GithubProviderClient.listVersions Dec 31, 2025
Copilot AI requested a review from MathiasVDA December 31, 2025 22:57
@MathiasVDA MathiasVDA closed this Dec 31, 2025
@MathiasVDA MathiasVDA deleted the copilot/sub-pr-103 branch December 31, 2025 23:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants