Skip to content

fix: Capture GCP HTTP errors in MCP Toolbox#2347

Merged
averikitsch merged 10 commits into
googleapis:mainfrom
mahlevanshika:fix/issue-2203-mcp-gcp-http-errors
Jan 23, 2026
Merged

fix: Capture GCP HTTP errors in MCP Toolbox#2347
averikitsch merged 10 commits into
googleapis:mainfrom
mahlevanshika:fix/issue-2203-mcp-gcp-http-errors

Conversation

@mahlevanshika

@mahlevanshika mahlevanshika commented Jan 22, 2026

Copy link
Copy Markdown
Contributor

Description

fix: Surface Dataplex API errors in MCP results

This change addresses issue #2203, where Dataplex API errors, such as '403 Forbidden' (Permission Denied), were not being properly surfaced in the MCP tool results. Previously, these critical API errors would manifest as generic "connection interrupted" messages, significantly hindering developer debugging and trust in the Toolbox.

The fix enhances the error handling within the 'dataplexsearchentries' and 'dataplexsearchaspecttypes' tools. When an error occurs during the iteration of Dataplex API results, the system now:

Utilizes 'google.golang.org/grpc/status.FromError' to attempt to convert the returned error into a gRPC status. This is crucial because Google Cloud client libraries often return errors compatible with gRPC.
If the error is a gRPC status, the canonical error code (e.g., 'codes.PermissionDenied') and the associated error message are extracted.
This ensures that users receive clear actionable error feedback, allowing for quicker diagnosis and resolution of issues like missing IAM permissions. This aligns with best practices for API error surfacing, improving the usability and reliability of the Dataplex tools within the GenAI Toolbox.

Fixes #2203

PR Checklist

Thank you for opening a Pull Request! Before submitting your PR, there are a
few things you can do to make sure it goes smoothly:

  • Make sure you reviewed
    CONTRIBUTING.md
  • Make sure to open an issue as a
    bug/issue
    before writing your code! That way we can discuss the change, evaluate
    designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)
  • Make sure to add ! if this involve a breaking change

🛠️ Fixes #<issue_number_goes_here>

@mahlevanshika mahlevanshika requested a review from a team January 22, 2026 06:18
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @mahlevanshika, 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 focuses on improving the robustness and clarity of error handling within the Dataplex source integration. It ensures that when interactions with the Dataplex API encounter issues, the resulting errors are more informative, specifically by detailing gRPC status codes and messages. This enhancement is crucial for debugging and understanding the root cause of API failures, leading to a more stable and maintainable system.

Highlights

  • Enhanced Error Handling: Improved error handling for Dataplex API calls in SearchAspectTypes and SearchEntries functions to provide more detailed information on gRPC errors.
  • Detailed gRPC Error Reporting: When an API call fails, the system now extracts and includes the gRPC status code and message in the returned error, offering better insights into the failure cause.
  • Correct Iterator Termination: Properly handles iterator.Done to gracefully terminate iteration loops for Dataplex API results, preventing unnecessary error logging when the iterator completes its work.
  • New Imports: Added google.golang.org/api/iterator and grpcstatus "google.golang.org/grpc/status" to support the enhanced error handling and iterator management.
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.

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

Copy link
Copy Markdown
Contributor

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 aims to fix GCP HTTP errors in the Dataplex source. The changes correctly introduce more robust error handling for iterator operations, checking for iterator.Done and handling other errors, including specific gRPC status errors.

However, the pull request contains unresolved merge conflicts in internal/sources/dataplex/dataplex.go, which are critical issues that must be resolved. I've left comments on the conflicting blocks with suggestions on how to resolve them and further improve the error handling by ensuring errors are always wrapped to preserve context.

Comment thread internal/sources/dataplex/dataplex.go Outdated
Comment thread internal/sources/dataplex/dataplex.go Outdated
@mahlevanshika mahlevanshika changed the title Fix/issue 2203 mcp gcp http errors Fix:issue 2203 mcp gcp http errors Jan 22, 2026
@mahlevanshika mahlevanshika changed the title Fix:issue 2203 mcp gcp http errors fix: Capture GCP HTTP errors in MCP Toolbox Jan 22, 2026
@duwenxin99

Copy link
Copy Markdown
Contributor

/gcbrun

@averikitsch averikitsch added the tests: run Label to trigger Github Action tests. label Jan 23, 2026
@averikitsch

Copy link
Copy Markdown
Contributor

/gcbrun

@github-actions github-actions Bot removed the tests: run Label to trigger Github Action tests. label Jan 23, 2026
@mahlevanshika mahlevanshika requested a review from a team January 23, 2026 18:26
@averikitsch

Copy link
Copy Markdown
Contributor

/gcbrun

@averikitsch averikitsch added the tests: run Label to trigger Github Action tests. label Jan 23, 2026
@github-actions github-actions Bot removed the tests: run Label to trigger Github Action tests. label Jan 23, 2026
@averikitsch

Copy link
Copy Markdown
Contributor

/gcbrun

@averikitsch averikitsch added the tests: run Label to trigger Github Action tests. label Jan 23, 2026
@github-actions github-actions Bot removed the tests: run Label to trigger Github Action tests. label Jan 23, 2026
@averikitsch averikitsch enabled auto-merge (squash) January 23, 2026 18:55
auto-merge was automatically disabled January 23, 2026 19:24

Head branch was pushed to by a user without write access

@averikitsch averikitsch added the tests: run Label to trigger Github Action tests. label Jan 23, 2026
@averikitsch

Copy link
Copy Markdown
Contributor

/gcbrun

@github-actions github-actions Bot removed the tests: run Label to trigger Github Action tests. label Jan 23, 2026
@averikitsch averikitsch enabled auto-merge (squash) January 23, 2026 19:34
@averikitsch averikitsch merged commit 1d7c498 into googleapis:main Jan 23, 2026
14 checks passed
kshalu-code pushed a commit to kshalu-code/genai-toolbox that referenced this pull request Feb 4, 2026
### Description

fix: Surface Dataplex API errors in MCP results

This change addresses issue
googleapis#2203, where Dataplex
API errors, such as '403 Forbidden' (Permission Denied), were not being
properly surfaced in the MCP tool results. Previously, these critical
API errors would manifest as generic "connection interrupted" messages,
significantly hindering developer debugging and trust in the Toolbox.

The fix enhances the error handling within the 'dataplexsearchentries'
and 'dataplexsearchaspecttypes' tools. When an error occurs during the
iteration of Dataplex API results, the system now:

Utilizes 'google.golang.org/grpc/status.FromError' to attempt to convert
the returned error into a gRPC status. This is crucial because Google
Cloud client libraries often return errors compatible with gRPC.
If the error is a gRPC status, the canonical error code (e.g.,
'codes.PermissionDenied') and the associated error message are
extracted.
This ensures that users receive clear actionable error feedback,
allowing for quicker diagnosis and resolution of issues like missing IAM
permissions. This aligns with best practices for API error surfacing,
improving the usability and reliability of the Dataplex tools within the
GenAI Toolbox.

Fixes googleapis#2203



## PR Checklist

> Thank you for opening a Pull Request! Before submitting your PR, there
are a
> few things you can do to make sure it goes smoothly:

- [ ] Make sure you reviewed

[CONTRIBUTING.md](https://github.com/googleapis/genai-toolbox/blob/main/CONTRIBUTING.md)
- [ ] Make sure to open an issue as a

[bug/issue](https://github.com/googleapis/genai-toolbox/issues/new/choose)
  before writing your code! That way we can discuss the change, evaluate
  designs, and agree on the general idea
- [ ] Ensure the tests and linter pass
- [ ] Code coverage does not decrease (if any source code was changed)
- [ ] Appropriate docs were updated (if necessary)
- [ ] Make sure to add `!` if this involve a breaking change

🛠️ Fixes #<issue_number_goes_here>

---------

Co-authored-by: Wenxin Du <117315983+duwenxin99@users.noreply.github.com>
Co-authored-by: Averi Kitsch <akitsch@google.com>
Yuan325 added a commit that referenced this pull request Feb 13, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.27.0](v0.26.0...v0.27.0)
(2026-02-12)


### ⚠ BREAKING CHANGES

* Update configuration file v2
([#2369](https://github.com/googleapis/genai-toolbox/issues/2369))([293c1d6](https://github.com/googleapis/genai-toolbox/commit/293c1d6889c39807855ba5e01d4c13ba2a4c50ce))
* Update/add detailed telemetry for mcp endpoint compliant with OTEL
semantic convention
([#1987](#1987))
([478a0bd](478a0bd))

### Features

* **cli/invoke:** Add support for direct tool invocation from CLI
([#2353](#2353))
([6e49ba4](6e49ba4))
* **cli/skills:** Add support for generating agent skills from toolset
([#2392](#2392))
([80ef346](80ef346))
* **cloud-logging-admin:** Add source, tools, integration test and docs
([#2137](#2137))
([252fc30](252fc30))
* **cockroachdb:** Add CockroachDB integration with cockroach-go
([#2006](#2006))
([1fdd99a](1fdd99a))
* **prebuiltconfigs/alloydb-omni:** Implement Alloydb omni dataplane
tools ([#2340](#2340))
([e995349](e995349))
* **server:** Add Tool call error categories
([#2387](#2387))
([32cb4db](32cb4db))
* **tools/looker:** support `looker-validate-project` tool
([#2430](#2430))
([a15a128](a15a128))



### Bug Fixes

* **dataplex:** Capture GCP HTTP errors in MCP Toolbox
([#2347](#2347))
([1d7c498](1d7c498))
* **sources/cockroachdb:** Update kind to type
([#2465](#2465))
([2d341ac](2d341ac))
* Surface Dataplex API errors in MCP results
([#2347](https://github.com/googleapis/genai-toolbox/pull/2347))([1d7c498](https://github.com/googleapis/genai-toolbox/commit/1d7c4981164c34b4d7bc8edecfd449f57ad11e15))


---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

---------

Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: Yuan Teoh <45984206+Yuan325@users.noreply.github.com>
github-actions Bot pushed a commit that referenced this pull request Feb 13, 2026
🤖 I have created a release *beep* *boop*
---

##
[0.27.0](v0.26.0...v0.27.0)
(2026-02-12)

### ⚠ BREAKING CHANGES

* Update configuration file v2
([#2369](https://github.com/googleapis/genai-toolbox/issues/2369))([293c1d6](https://github.com/googleapis/genai-toolbox/commit/293c1d6889c39807855ba5e01d4c13ba2a4c50ce))
* Update/add detailed telemetry for mcp endpoint compliant with OTEL
semantic convention
([#1987](#1987))
([478a0bd](478a0bd))

### Features

* **cli/invoke:** Add support for direct tool invocation from CLI
([#2353](#2353))
([6e49ba4](6e49ba4))
* **cli/skills:** Add support for generating agent skills from toolset
([#2392](#2392))
([80ef346](80ef346))
* **cloud-logging-admin:** Add source, tools, integration test and docs
([#2137](#2137))
([252fc30](252fc30))
* **cockroachdb:** Add CockroachDB integration with cockroach-go
([#2006](#2006))
([1fdd99a](1fdd99a))
* **prebuiltconfigs/alloydb-omni:** Implement Alloydb omni dataplane
tools ([#2340](#2340))
([e995349](e995349))
* **server:** Add Tool call error categories
([#2387](#2387))
([32cb4db](32cb4db))
* **tools/looker:** support `looker-validate-project` tool
([#2430](#2430))
([a15a128](a15a128))

### Bug Fixes

* **dataplex:** Capture GCP HTTP errors in MCP Toolbox
([#2347](#2347))
([1d7c498](1d7c498))
* **sources/cockroachdb:** Update kind to type
([#2465](#2465))
([2d341ac](2d341ac))
* Surface Dataplex API errors in MCP results
([#2347](https://github.com/googleapis/genai-toolbox/pull/2347))([1d7c498](https://github.com/googleapis/genai-toolbox/commit/1d7c4981164c34b4d7bc8edecfd449f57ad11e15))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

---------

Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: Yuan Teoh <45984206+Yuan325@users.noreply.github.com> c5524d3
github-actions Bot pushed a commit to renovate-bot/googleapis-_-genai-toolbox that referenced this pull request Feb 13, 2026
🤖 I have created a release *beep* *boop*
---

##
[0.27.0](googleapis/mcp-toolbox@v0.26.0...v0.27.0)
(2026-02-12)

### ⚠ BREAKING CHANGES

* Update configuration file v2
([googleapis#2369](https://github.com/googleapis/genai-toolbox/issues/2369))([293c1d6](https://github.com/googleapis/genai-toolbox/commit/293c1d6889c39807855ba5e01d4c13ba2a4c50ce))
* Update/add detailed telemetry for mcp endpoint compliant with OTEL
semantic convention
([googleapis#1987](googleapis#1987))
([478a0bd](googleapis@478a0bd))

### Features

* **cli/invoke:** Add support for direct tool invocation from CLI
([googleapis#2353](googleapis#2353))
([6e49ba4](googleapis@6e49ba4))
* **cli/skills:** Add support for generating agent skills from toolset
([googleapis#2392](googleapis#2392))
([80ef346](googleapis@80ef346))
* **cloud-logging-admin:** Add source, tools, integration test and docs
([googleapis#2137](googleapis#2137))
([252fc30](googleapis@252fc30))
* **cockroachdb:** Add CockroachDB integration with cockroach-go
([googleapis#2006](googleapis#2006))
([1fdd99a](googleapis@1fdd99a))
* **prebuiltconfigs/alloydb-omni:** Implement Alloydb omni dataplane
tools ([googleapis#2340](googleapis#2340))
([e995349](googleapis@e995349))
* **server:** Add Tool call error categories
([googleapis#2387](googleapis#2387))
([32cb4db](googleapis@32cb4db))
* **tools/looker:** support `looker-validate-project` tool
([googleapis#2430](googleapis#2430))
([a15a128](googleapis@a15a128))

### Bug Fixes

* **dataplex:** Capture GCP HTTP errors in MCP Toolbox
([googleapis#2347](googleapis#2347))
([1d7c498](googleapis@1d7c498))
* **sources/cockroachdb:** Update kind to type
([googleapis#2465](googleapis#2465))
([2d341ac](googleapis@2d341ac))
* Surface Dataplex API errors in MCP results
([googleapis#2347](https://github.com/googleapis/genai-toolbox/pull/2347))([1d7c498](https://github.com/googleapis/genai-toolbox/commit/1d7c4981164c34b4d7bc8edecfd449f57ad11e15))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

---------

Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: Yuan Teoh <45984206+Yuan325@users.noreply.github.com> c5524d3
github-actions Bot pushed a commit to bhardwajRahul/genai-toolbox that referenced this pull request Feb 14, 2026
🤖 I have created a release *beep* *boop*
---

##
[0.27.0](googleapis/mcp-toolbox@v0.26.0...v0.27.0)
(2026-02-12)

### ⚠ BREAKING CHANGES

* Update configuration file v2
([googleapis#2369](https://github.com/googleapis/genai-toolbox/issues/2369))([293c1d6](https://github.com/googleapis/genai-toolbox/commit/293c1d6889c39807855ba5e01d4c13ba2a4c50ce))
* Update/add detailed telemetry for mcp endpoint compliant with OTEL
semantic convention
([googleapis#1987](googleapis#1987))
([478a0bd](googleapis@478a0bd))

### Features

* **cli/invoke:** Add support for direct tool invocation from CLI
([googleapis#2353](googleapis#2353))
([6e49ba4](googleapis@6e49ba4))
* **cli/skills:** Add support for generating agent skills from toolset
([googleapis#2392](googleapis#2392))
([80ef346](googleapis@80ef346))
* **cloud-logging-admin:** Add source, tools, integration test and docs
([googleapis#2137](googleapis#2137))
([252fc30](googleapis@252fc30))
* **cockroachdb:** Add CockroachDB integration with cockroach-go
([googleapis#2006](googleapis#2006))
([1fdd99a](googleapis@1fdd99a))
* **prebuiltconfigs/alloydb-omni:** Implement Alloydb omni dataplane
tools ([googleapis#2340](googleapis#2340))
([e995349](googleapis@e995349))
* **server:** Add Tool call error categories
([googleapis#2387](googleapis#2387))
([32cb4db](googleapis@32cb4db))
* **tools/looker:** support `looker-validate-project` tool
([googleapis#2430](googleapis#2430))
([a15a128](googleapis@a15a128))

### Bug Fixes

* **dataplex:** Capture GCP HTTP errors in MCP Toolbox
([googleapis#2347](googleapis#2347))
([1d7c498](googleapis@1d7c498))
* **sources/cockroachdb:** Update kind to type
([googleapis#2465](googleapis#2465))
([2d341ac](googleapis@2d341ac))
* Surface Dataplex API errors in MCP results
([googleapis#2347](https://github.com/googleapis/genai-toolbox/pull/2347))([1d7c498](https://github.com/googleapis/genai-toolbox/commit/1d7c4981164c34b4d7bc8edecfd449f57ad11e15))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

---------

Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: Yuan Teoh <45984206+Yuan325@users.noreply.github.com> c5524d3
rahulpinto19 pushed a commit that referenced this pull request Feb 16, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.27.0](v0.26.0...v0.27.0)
(2026-02-12)


### ⚠ BREAKING CHANGES

* Update configuration file v2
([#2369](https://github.com/googleapis/genai-toolbox/issues/2369))([293c1d6](https://github.com/googleapis/genai-toolbox/commit/293c1d6889c39807855ba5e01d4c13ba2a4c50ce))
* Update/add detailed telemetry for mcp endpoint compliant with OTEL
semantic convention
([#1987](#1987))
([478a0bd](478a0bd))

### Features

* **cli/invoke:** Add support for direct tool invocation from CLI
([#2353](#2353))
([6e49ba4](6e49ba4))
* **cli/skills:** Add support for generating agent skills from toolset
([#2392](#2392))
([80ef346](80ef346))
* **cloud-logging-admin:** Add source, tools, integration test and docs
([#2137](#2137))
([252fc30](252fc30))
* **cockroachdb:** Add CockroachDB integration with cockroach-go
([#2006](#2006))
([1fdd99a](1fdd99a))
* **prebuiltconfigs/alloydb-omni:** Implement Alloydb omni dataplane
tools ([#2340](#2340))
([e995349](e995349))
* **server:** Add Tool call error categories
([#2387](#2387))
([32cb4db](32cb4db))
* **tools/looker:** support `looker-validate-project` tool
([#2430](#2430))
([a15a128](a15a128))



### Bug Fixes

* **dataplex:** Capture GCP HTTP errors in MCP Toolbox
([#2347](#2347))
([1d7c498](1d7c498))
* **sources/cockroachdb:** Update kind to type
([#2465](#2465))
([2d341ac](2d341ac))
* Surface Dataplex API errors in MCP results
([#2347](https://github.com/googleapis/genai-toolbox/pull/2347))([1d7c498](https://github.com/googleapis/genai-toolbox/commit/1d7c4981164c34b4d7bc8edecfd449f57ad11e15))


---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

---------

Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: Yuan Teoh <45984206+Yuan325@users.noreply.github.com>
nester-neo4j pushed a commit to nester-neo4j/genai-toolbox that referenced this pull request Feb 17, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.27.0](googleapis/mcp-toolbox@v0.26.0...v0.27.0)
(2026-02-12)


### ⚠ BREAKING CHANGES

* Update configuration file v2
([googleapis#2369](https://github.com/googleapis/genai-toolbox/issues/2369))([293c1d6](https://github.com/googleapis/genai-toolbox/commit/293c1d6889c39807855ba5e01d4c13ba2a4c50ce))
* Update/add detailed telemetry for mcp endpoint compliant with OTEL
semantic convention
([googleapis#1987](googleapis#1987))
([478a0bd](googleapis@478a0bd))

### Features

* **cli/invoke:** Add support for direct tool invocation from CLI
([googleapis#2353](googleapis#2353))
([6e49ba4](googleapis@6e49ba4))
* **cli/skills:** Add support for generating agent skills from toolset
([googleapis#2392](googleapis#2392))
([80ef346](googleapis@80ef346))
* **cloud-logging-admin:** Add source, tools, integration test and docs
([googleapis#2137](googleapis#2137))
([252fc30](googleapis@252fc30))
* **cockroachdb:** Add CockroachDB integration with cockroach-go
([googleapis#2006](googleapis#2006))
([1fdd99a](googleapis@1fdd99a))
* **prebuiltconfigs/alloydb-omni:** Implement Alloydb omni dataplane
tools ([googleapis#2340](googleapis#2340))
([e995349](googleapis@e995349))
* **server:** Add Tool call error categories
([googleapis#2387](googleapis#2387))
([32cb4db](googleapis@32cb4db))
* **tools/looker:** support `looker-validate-project` tool
([googleapis#2430](googleapis#2430))
([a15a128](googleapis@a15a128))



### Bug Fixes

* **dataplex:** Capture GCP HTTP errors in MCP Toolbox
([googleapis#2347](googleapis#2347))
([1d7c498](googleapis@1d7c498))
* **sources/cockroachdb:** Update kind to type
([googleapis#2465](googleapis#2465))
([2d341ac](googleapis@2d341ac))
* Surface Dataplex API errors in MCP results
([googleapis#2347](https://github.com/googleapis/genai-toolbox/pull/2347))([1d7c498](https://github.com/googleapis/genai-toolbox/commit/1d7c4981164c34b4d7bc8edecfd449f57ad11e15))


---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

---------

Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: Yuan Teoh <45984206+Yuan325@users.noreply.github.com>
dumians pushed a commit to dumians/genai-toolbox that referenced this pull request Feb 18, 2026
### Description

fix: Surface Dataplex API errors in MCP results

This change addresses issue
googleapis#2203, where Dataplex
API errors, such as '403 Forbidden' (Permission Denied), were not being
properly surfaced in the MCP tool results. Previously, these critical
API errors would manifest as generic "connection interrupted" messages,
significantly hindering developer debugging and trust in the Toolbox.

The fix enhances the error handling within the 'dataplexsearchentries'
and 'dataplexsearchaspecttypes' tools. When an error occurs during the
iteration of Dataplex API results, the system now:

Utilizes 'google.golang.org/grpc/status.FromError' to attempt to convert
the returned error into a gRPC status. This is crucial because Google
Cloud client libraries often return errors compatible with gRPC.
If the error is a gRPC status, the canonical error code (e.g.,
'codes.PermissionDenied') and the associated error message are
extracted.
This ensures that users receive clear actionable error feedback,
allowing for quicker diagnosis and resolution of issues like missing IAM
permissions. This aligns with best practices for API error surfacing,
improving the usability and reliability of the Dataplex tools within the
GenAI Toolbox.

Fixes googleapis#2203



## PR Checklist

> Thank you for opening a Pull Request! Before submitting your PR, there
are a
> few things you can do to make sure it goes smoothly:

- [ ] Make sure you reviewed

[CONTRIBUTING.md](https://github.com/googleapis/genai-toolbox/blob/main/CONTRIBUTING.md)
- [ ] Make sure to open an issue as a

[bug/issue](https://github.com/googleapis/genai-toolbox/issues/new/choose)
  before writing your code! That way we can discuss the change, evaluate
  designs, and agree on the general idea
- [ ] Ensure the tests and linter pass
- [ ] Code coverage does not decrease (if any source code was changed)
- [ ] Appropriate docs were updated (if necessary)
- [ ] Make sure to add `!` if this involve a breaking change

🛠️ Fixes #<issue_number_goes_here>

---------

Co-authored-by: Wenxin Du <117315983+duwenxin99@users.noreply.github.com>
Co-authored-by: Averi Kitsch <akitsch@google.com>
dumians pushed a commit to dumians/genai-toolbox that referenced this pull request Feb 18, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.27.0](googleapis/mcp-toolbox@v0.26.0...v0.27.0)
(2026-02-12)


### ⚠ BREAKING CHANGES

* Update configuration file v2
([googleapis#2369](https://github.com/googleapis/genai-toolbox/issues/2369))([293c1d6](https://github.com/googleapis/genai-toolbox/commit/293c1d6889c39807855ba5e01d4c13ba2a4c50ce))
* Update/add detailed telemetry for mcp endpoint compliant with OTEL
semantic convention
([googleapis#1987](googleapis#1987))
([478a0bd](googleapis@478a0bd))

### Features

* **cli/invoke:** Add support for direct tool invocation from CLI
([googleapis#2353](googleapis#2353))
([6e49ba4](googleapis@6e49ba4))
* **cli/skills:** Add support for generating agent skills from toolset
([googleapis#2392](googleapis#2392))
([80ef346](googleapis@80ef346))
* **cloud-logging-admin:** Add source, tools, integration test and docs
([googleapis#2137](googleapis#2137))
([252fc30](googleapis@252fc30))
* **cockroachdb:** Add CockroachDB integration with cockroach-go
([googleapis#2006](googleapis#2006))
([1fdd99a](googleapis@1fdd99a))
* **prebuiltconfigs/alloydb-omni:** Implement Alloydb omni dataplane
tools ([googleapis#2340](googleapis#2340))
([e995349](googleapis@e995349))
* **server:** Add Tool call error categories
([googleapis#2387](googleapis#2387))
([32cb4db](googleapis@32cb4db))
* **tools/looker:** support `looker-validate-project` tool
([googleapis#2430](googleapis#2430))
([a15a128](googleapis@a15a128))



### Bug Fixes

* **dataplex:** Capture GCP HTTP errors in MCP Toolbox
([googleapis#2347](googleapis#2347))
([1d7c498](googleapis@1d7c498))
* **sources/cockroachdb:** Update kind to type
([googleapis#2465](googleapis#2465))
([2d341ac](googleapis@2d341ac))
* Surface Dataplex API errors in MCP results
([googleapis#2347](https://github.com/googleapis/genai-toolbox/pull/2347))([1d7c498](https://github.com/googleapis/genai-toolbox/commit/1d7c4981164c34b4d7bc8edecfd449f57ad11e15))


---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

---------

Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: Yuan Teoh <45984206+Yuan325@users.noreply.github.com>
NightStack15 added a commit to NightStack15/googleapis-_-genai-toolbox that referenced this pull request Mar 20, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.27.0](googleapis/mcp-toolbox@v0.26.0...v0.27.0)
(2026-02-12)


### ⚠ BREAKING CHANGES

* Update configuration file v2
([#2369](https://github.com/googleapis/genai-toolbox/issues/2369))([293c1d6](https://github.com/googleapis/genai-toolbox/commit/293c1d6889c39807855ba5e01d4c13ba2a4c50ce))
* Update/add detailed telemetry for mcp endpoint compliant with OTEL
semantic convention
([#1987](googleapis/mcp-toolbox#1987))
([478a0bd](googleapis/mcp-toolbox@478a0bd))

### Features

* **cli/invoke:** Add support for direct tool invocation from CLI
([#2353](googleapis/mcp-toolbox#2353))
([6e49ba4](googleapis/mcp-toolbox@6e49ba4))
* **cli/skills:** Add support for generating agent skills from toolset
([#2392](googleapis/mcp-toolbox#2392))
([80ef346](googleapis/mcp-toolbox@80ef346))
* **cloud-logging-admin:** Add source, tools, integration test and docs
([#2137](googleapis/mcp-toolbox#2137))
([252fc30](googleapis/mcp-toolbox@252fc30))
* **cockroachdb:** Add CockroachDB integration with cockroach-go
([#2006](googleapis/mcp-toolbox#2006))
([1fdd99a](googleapis/mcp-toolbox@1fdd99a))
* **prebuiltconfigs/alloydb-omni:** Implement Alloydb omni dataplane
tools ([#2340](googleapis/mcp-toolbox#2340))
([e995349](googleapis/mcp-toolbox@e995349))
* **server:** Add Tool call error categories
([#2387](googleapis/mcp-toolbox#2387))
([32cb4db](googleapis/mcp-toolbox@32cb4db))
* **tools/looker:** support `looker-validate-project` tool
([#2430](googleapis/mcp-toolbox#2430))
([a15a128](googleapis/mcp-toolbox@a15a128))



### Bug Fixes

* **dataplex:** Capture GCP HTTP errors in MCP Toolbox
([#2347](googleapis/mcp-toolbox#2347))
([1d7c498](googleapis/mcp-toolbox@1d7c498))
* **sources/cockroachdb:** Update kind to type
([#2465](googleapis/mcp-toolbox#2465))
([2d341ac](googleapis/mcp-toolbox@2d341ac))
* Surface Dataplex API errors in MCP results
([#2347](https://github.com/googleapis/genai-toolbox/pull/2347))([1d7c498](https://github.com/googleapis/genai-toolbox/commit/1d7c4981164c34b4d7bc8edecfd449f57ad11e15))


---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

---------

Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: Yuan Teoh <45984206+Yuan325@users.noreply.github.com>
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.

MCP Silences Dataplex 403 API Errors

3 participants