Skip to content

fix: export transport agnostic errors from client#272

Merged
ishymko merged 2 commits intomainfrom
ishymko/export-errors
Dec 17, 2025
Merged

fix: export transport agnostic errors from client#272
ishymko merged 2 commits intomainfrom
ishymko/export-errors

Conversation

@ishymko
Copy link
Member

@ishymko ishymko commented Dec 17, 2025

Description

Due to a name conflict with legacy JSON-RPC types reexported from src/index.ts below errors are going to be exported via src/client/index.ts to allow usage from external transport implementations.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @ishymko, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request resolves a naming conflict by relocating the export of several transport-agnostic error types. These errors, previously intended for re-export from src/index.ts, are now explicitly exported through src/client/index.ts. This change ensures that external transport implementations can correctly access and utilize these error types without encountering conflicts with legacy JSON-RPC definitions, improving overall system robustness and clarity.

Highlights

  • Error Export Relocation: Transport-agnostic error types, such as TaskNotFoundError and UnsupportedOperationError, are now explicitly exported from src/client/index.ts.
  • Name Conflict Resolution: This change addresses a name conflict with legacy JSON-RPC types that were previously re-exported from src/index.ts.
  • Improved External Transport Compatibility: The new export path allows external transport implementations to correctly utilize these error types without encountering conflicts.
  • Documentation Update: Comments within src/errors.ts have been updated to provide a clearer explanation of the rationale behind this export strategy and reference the A2A protocol specification.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@github-actions
Copy link

github-actions bot commented Dec 17, 2025

🧪 Code Coverage

⬇️ Download Full Report

Metric Main PR Delta
lines 82.33% 82.31% 🔴 -0.02%
statements 82.33% 82.31% 🔴 -0.02%
functions 89.81% 89.81% ⚪️ 0.00%
branches 82.9% 82.9% ⚪️ 0.00%

Generated by coverage-comment.yml

@ishymko ishymko mentioned this pull request Dec 17, 2025
8 tasks
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request refactors error exports to resolve a naming conflict, which is a good improvement. My review includes a few suggestions to enhance code style and documentation clarity. Specifically, I recommend sorting the new exports in src/client/index.ts for better readability and adjusting the comments in src/errors.ts to ensure both the error codes and classes have clear, distinct documentation.

@ishymko ishymko force-pushed the ishymko/export-errors branch from ad8ac63 to 1bfdcc8 Compare December 17, 2025 14:10
@ishymko ishymko marked this pull request as ready for review December 17, 2025 14:14
@ishymko ishymko requested a review from a team as a code owner December 17, 2025 14:14
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@ishymko ishymko enabled auto-merge (squash) December 17, 2025 14:26
@ishymko ishymko merged commit 23cd42e into main Dec 17, 2025
14 checks passed
@ishymko ishymko deleted the ishymko/export-errors branch December 17, 2025 14:34
ishymko pushed a commit that referenced this pull request Dec 17, 2025
🤖 I have created a release *beep* *boop*
---


## [0.3.7](v0.3.6...v0.3.7)
(2025-12-17)


### Features

* add rest client
([#258](#258))
([96be3a1](96be3a1))
* remove EventEmitter dependency to support Edge Runtime
([#219](#219))
([6c76fef](6c76fef)),
closes [#218](#218)


### Bug Fixes

* export transport agnostic errors from client
([#272](#272))
([23cd42e](23cd42e))
* pass ServerCallContext to getAuthenticatedExtendedAgentCard for REST
([#274](#274))
([89b141b](89b141b)),
closes [#137](#137)

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
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