fix(parameters): report the offending value in array/map type errors#3512
Merged
Yuan325 merged 4 commits intoJul 7, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request fixes an issue in the array and map parameter parsers where type assertion failures reported the nil zero-value of the target type instead of the actual offending input value. A new unit test, TestParseTypeErrorReportsValue, has been added to verify that the correct offending value is reported in the error message. There are no review comments to address.
This was referenced Jun 24, 2026
ArrayParameter.Parse and MapParameter.Parse passed their asserted variable (arrVal / m) to ParseTypeError, but that assertion had already failed, so the value was always the nil zero value. The errors read `[] not type "array"` and `map[] not type "map"` instead of naming the actual input. Every other Parse implementation passes the original value v; align these two with it.
he-yufeng
force-pushed
the
fix/array-map-parse-error-value
branch
from
June 25, 2026 04:51
150b734 to
0982761
Compare
Yuan325
approved these changes
Jul 7, 2026
Yuan325
added a commit
that referenced
this pull request
Jul 7, 2026
… type field (#3516) ## Description `parseParamFromDelayedUnmarshaler` reads the `type` field from a parameter map and passes it straight to `ParseParameter` with an unchecked type assertion: ```go return ParseParameter(ctx, p, t.(string)) ``` If a tools file declares a parameter whose `type` is not a string (for example `type: 123` from a YAML typo, or `type:` left as a mapping), `t.(string)` panics with `interface conversion: interface {} is int, not string` instead of surfacing a config error. The panic propagates out of `UnmarshalYAML`, so a single malformed parameter takes down config loading with a stack trace rather than a readable message. This is inconsistent with the rest of the function and with `ParseParameter` itself: the missing-`type` case right above already returns a clean error, and `ParseParameter`'s switch has a default branch that reports unknown types as errors. Only the string assertion was unguarded. The fix uses the comma-ok form and returns the same style of error the surrounding code already uses: ```go typeStr, ok := t.(string) if !ok { return nil, fmt.Errorf("parameter 'type' field must be a string, got %T", t) } return ParseParameter(ctx, p, typeStr) ``` Added a `TestFailParametersUnmarshal` case ("common parameter with non-string type") that feeds an integer `type` and expects the error. I confirmed it panics on `main` before the change and passes after; the full `internal/util/parameters` package still passes and `gofmt`/`go vet` are clean. Note this is a separate concern from #3512, which also touches `parameters.go` but in a different function (the array/map element parsing paths). No overlap with that change. ## PR Checklist - [x] Make sure you reviewed [CONTRIBUTING.md](https://github.com/googleapis/mcp-toolbox/blob/main/CONTRIBUTING.md) - [x] Ensure the tests and linter pass - [x] Code coverage does not decrease (added a test covering the new branch) - [ ] Appropriate docs were updated (no behavior/doc change, internal robustness fix) Co-authored-by: Yuan Teoh <45984206+Yuan325@users.noreply.github.com>
Contributor
|
/gcbrun |
Yuan325
enabled auto-merge (squash)
July 7, 2026 03:42
github-actions Bot
pushed a commit
to rodineyw/mcp-toolbox
that referenced
this pull request
Jul 7, 2026
… errors (googleapis#3512) ## Description `ArrayParameter.Parse` and `MapParameter.Parse` construct their `ParseTypeError` from the variable produced by the type assertion (`arrVal` / `m`). But that branch is only reached *after* the assertion has failed, so the variable is always the nil zero value. The resulting error drops the value the caller actually passed: - an array parameter given a string reports `[] not type "array"` - a map parameter given a string reports `map[] not type "map"` Every other `Parse` implementation (`StringParameter`, `IntParameter`, `FloatParameter`, `BooleanParameter`, …) passes the original `v` to `ParseTypeError`; these two had just drifted out of line. Passing `v` in both restores the actual input in the message: - `"not-an-array" not type "array"` - `"not-a-map" not type "map"` Added `TestParseTypeErrorReportsValue`, which asserts the array/map type errors name the offending value. It fails on `main` and passes with this change. ## PR Checklist - [x] Reviewed CONTRIBUTING.md - [x] Tests and linter pass locally (`go test ./internal/util/parameters/`, `go vet`, `gofmt -l`) - [x] Code coverage does not decrease (adds a test) - [ ] Docs — not applicable - [ ] Breaking change — no Didn't file a separate issue first since this is a small, self-contained consistency fix; happy to open one if you'd prefer to track it. Co-authored-by: Yuan Teoh <45984206+Yuan325@users.noreply.github.com> 4034d6f
github-actions Bot
pushed a commit
to Jaleel-zhu/genai-toolbox
that referenced
this pull request
Jul 7, 2026
… errors (googleapis#3512) ## Description `ArrayParameter.Parse` and `MapParameter.Parse` construct their `ParseTypeError` from the variable produced by the type assertion (`arrVal` / `m`). But that branch is only reached *after* the assertion has failed, so the variable is always the nil zero value. The resulting error drops the value the caller actually passed: - an array parameter given a string reports `[] not type "array"` - a map parameter given a string reports `map[] not type "map"` Every other `Parse` implementation (`StringParameter`, `IntParameter`, `FloatParameter`, `BooleanParameter`, …) passes the original `v` to `ParseTypeError`; these two had just drifted out of line. Passing `v` in both restores the actual input in the message: - `"not-an-array" not type "array"` - `"not-a-map" not type "map"` Added `TestParseTypeErrorReportsValue`, which asserts the array/map type errors name the offending value. It fails on `main` and passes with this change. ## PR Checklist - [x] Reviewed CONTRIBUTING.md - [x] Tests and linter pass locally (`go test ./internal/util/parameters/`, `go vet`, `gofmt -l`) - [x] Code coverage does not decrease (adds a test) - [ ] Docs — not applicable - [ ] Breaking change — no Didn't file a separate issue first since this is a small, self-contained consistency fix; happy to open one if you'd prefer to track it. Co-authored-by: Yuan Teoh <45984206+Yuan325@users.noreply.github.com> 4034d6f
github-actions Bot
pushed a commit
to pepe57/genai-toolbox
that referenced
this pull request
Jul 7, 2026
… errors (googleapis#3512) ## Description `ArrayParameter.Parse` and `MapParameter.Parse` construct their `ParseTypeError` from the variable produced by the type assertion (`arrVal` / `m`). But that branch is only reached *after* the assertion has failed, so the variable is always the nil zero value. The resulting error drops the value the caller actually passed: - an array parameter given a string reports `[] not type "array"` - a map parameter given a string reports `map[] not type "map"` Every other `Parse` implementation (`StringParameter`, `IntParameter`, `FloatParameter`, `BooleanParameter`, …) passes the original `v` to `ParseTypeError`; these two had just drifted out of line. Passing `v` in both restores the actual input in the message: - `"not-an-array" not type "array"` - `"not-a-map" not type "map"` Added `TestParseTypeErrorReportsValue`, which asserts the array/map type errors name the offending value. It fails on `main` and passes with this change. ## PR Checklist - [x] Reviewed CONTRIBUTING.md - [x] Tests and linter pass locally (`go test ./internal/util/parameters/`, `go vet`, `gofmt -l`) - [x] Code coverage does not decrease (adds a test) - [ ] Docs — not applicable - [ ] Breaking change — no Didn't file a separate issue first since this is a small, self-contained consistency fix; happy to open one if you'd prefer to track it. Co-authored-by: Yuan Teoh <45984206+Yuan325@users.noreply.github.com> 4034d6f
Yuan325
added a commit
that referenced
this pull request
Jul 16, 2026
🤖 I have created a release *beep* *boop* --- ## [1.7.0](v1.6.0...v1.7.0) (2026-07-16) #### Features * Add `quotaProject` support for BigQuery and Looker conversational analytics ([#2610](#2610)) ([f3e7ca9](f3e7ca9)) * **arcadedb:** Add arcadedb source and tools ([#2961](#2961)) ([351de00](351de00)) * **cmd/internal,docs:** Add warning log that prebuilt tools are for developer use ([#3451](#3451)) ([8cffcef](8cffcef)) * **source/postgres:** Add optional connectTimeout ([#3620](#3620)) ([b574b07](b574b07)) * **tool/clickhouse-sql:** Add native vector embedding support ([#3229](#3229)) ([6cbe1c2](6cbe1c2)) * **tool/dataplex-update-data-product,tool/dataplex-create-data-asset,tool/dataplex-update-data-asset:** Add update data product, create data asset, and update data asset tools for knowledge catalog source ([#3574](#3574)) ([721c204](721c204)) * **tools/dataplex-create-data-product:** Add dataplex-create-data-product tool ([#3504](#3504)) ([5cee0d2](5cee0d2)) * **tools/dataplex-get-data-asset:** Add dataplex-get-data-asset tool ([#3503](#3503)) ([1ddfbe9](1ddfbe9)) ### Bug Fixes * **parameters:** Report the offending value in array/map type errors ([#3512](#3512)) ([4034d6f](4034d6f)) * **parameters:** Return an error instead of panicking on a non-string type field ([#3516](#3516)) ([66a0d53](66a0d53)) * **source/looker:** Dynamically resolve public host URL ([#3603](#3603)) ([0428afd](0428afd)) * **tool/looker-run-dashboard:** Add support for SQL Runner query tiles ([#3594](#3594)) ([0975d0a](0975d0a)) --- 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
Jul 16, 2026
🤖 I have created a release *beep* *boop* --- ## [1.7.0](v1.6.0...v1.7.0) (2026-07-16) #### Features * Add `quotaProject` support for BigQuery and Looker conversational analytics ([#2610](#2610)) ([f3e7ca9](f3e7ca9)) * **arcadedb:** Add arcadedb source and tools ([#2961](#2961)) ([351de00](351de00)) * **cmd/internal,docs:** Add warning log that prebuilt tools are for developer use ([#3451](#3451)) ([8cffcef](8cffcef)) * **source/postgres:** Add optional connectTimeout ([#3620](#3620)) ([b574b07](b574b07)) * **tool/clickhouse-sql:** Add native vector embedding support ([#3229](#3229)) ([6cbe1c2](6cbe1c2)) * **tool/dataplex-update-data-product,tool/dataplex-create-data-asset,tool/dataplex-update-data-asset:** Add update data product, create data asset, and update data asset tools for knowledge catalog source ([#3574](#3574)) ([721c204](721c204)) * **tools/dataplex-create-data-product:** Add dataplex-create-data-product tool ([#3504](#3504)) ([5cee0d2](5cee0d2)) * **tools/dataplex-get-data-asset:** Add dataplex-get-data-asset tool ([#3503](#3503)) ([1ddfbe9](1ddfbe9)) ### Bug Fixes * **parameters:** Report the offending value in array/map type errors ([#3512](#3512)) ([4034d6f](4034d6f)) * **parameters:** Return an error instead of panicking on a non-string type field ([#3516](#3516)) ([66a0d53](66a0d53)) * **source/looker:** Dynamically resolve public host URL ([#3603](#3603)) ([0428afd](0428afd)) * **tool/looker-run-dashboard:** Add support for SQL Runner query tiles ([#3594](#3594)) ([0975d0a](0975d0a)) --- 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> fbe2b21
github-actions Bot
pushed a commit
to rodineyw/mcp-toolbox
that referenced
this pull request
Jul 17, 2026
🤖 I have created a release *beep* *boop* --- ## [1.7.0](googleapis/mcp-toolbox@v1.6.0...v1.7.0) (2026-07-16) #### Features * Add `quotaProject` support for BigQuery and Looker conversational analytics ([googleapis#2610](googleapis#2610)) ([f3e7ca9](googleapis@f3e7ca9)) * **arcadedb:** Add arcadedb source and tools ([googleapis#2961](googleapis#2961)) ([351de00](googleapis@351de00)) * **cmd/internal,docs:** Add warning log that prebuilt tools are for developer use ([googleapis#3451](googleapis#3451)) ([8cffcef](googleapis@8cffcef)) * **source/postgres:** Add optional connectTimeout ([googleapis#3620](googleapis#3620)) ([b574b07](googleapis@b574b07)) * **tool/clickhouse-sql:** Add native vector embedding support ([googleapis#3229](googleapis#3229)) ([6cbe1c2](googleapis@6cbe1c2)) * **tool/dataplex-update-data-product,tool/dataplex-create-data-asset,tool/dataplex-update-data-asset:** Add update data product, create data asset, and update data asset tools for knowledge catalog source ([googleapis#3574](googleapis#3574)) ([721c204](googleapis@721c204)) * **tools/dataplex-create-data-product:** Add dataplex-create-data-product tool ([googleapis#3504](googleapis#3504)) ([5cee0d2](googleapis@5cee0d2)) * **tools/dataplex-get-data-asset:** Add dataplex-get-data-asset tool ([googleapis#3503](googleapis#3503)) ([1ddfbe9](googleapis@1ddfbe9)) ### Bug Fixes * **parameters:** Report the offending value in array/map type errors ([googleapis#3512](googleapis#3512)) ([4034d6f](googleapis@4034d6f)) * **parameters:** Return an error instead of panicking on a non-string type field ([googleapis#3516](googleapis#3516)) ([66a0d53](googleapis@66a0d53)) * **source/looker:** Dynamically resolve public host URL ([googleapis#3603](googleapis#3603)) ([0428afd](googleapis@0428afd)) * **tool/looker-run-dashboard:** Add support for SQL Runner query tiles ([googleapis#3594](googleapis#3594)) ([0975d0a](googleapis@0975d0a)) --- 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> fbe2b21
github-actions Bot
pushed a commit
to Jaleel-zhu/genai-toolbox
that referenced
this pull request
Jul 17, 2026
🤖 I have created a release *beep* *boop* --- ## [1.7.0](googleapis/mcp-toolbox@v1.6.0...v1.7.0) (2026-07-16) #### Features * Add `quotaProject` support for BigQuery and Looker conversational analytics ([googleapis#2610](googleapis#2610)) ([f3e7ca9](googleapis@f3e7ca9)) * **arcadedb:** Add arcadedb source and tools ([googleapis#2961](googleapis#2961)) ([351de00](googleapis@351de00)) * **cmd/internal,docs:** Add warning log that prebuilt tools are for developer use ([googleapis#3451](googleapis#3451)) ([8cffcef](googleapis@8cffcef)) * **source/postgres:** Add optional connectTimeout ([googleapis#3620](googleapis#3620)) ([b574b07](googleapis@b574b07)) * **tool/clickhouse-sql:** Add native vector embedding support ([googleapis#3229](googleapis#3229)) ([6cbe1c2](googleapis@6cbe1c2)) * **tool/dataplex-update-data-product,tool/dataplex-create-data-asset,tool/dataplex-update-data-asset:** Add update data product, create data asset, and update data asset tools for knowledge catalog source ([googleapis#3574](googleapis#3574)) ([721c204](googleapis@721c204)) * **tools/dataplex-create-data-product:** Add dataplex-create-data-product tool ([googleapis#3504](googleapis#3504)) ([5cee0d2](googleapis@5cee0d2)) * **tools/dataplex-get-data-asset:** Add dataplex-get-data-asset tool ([googleapis#3503](googleapis#3503)) ([1ddfbe9](googleapis@1ddfbe9)) ### Bug Fixes * **parameters:** Report the offending value in array/map type errors ([googleapis#3512](googleapis#3512)) ([4034d6f](googleapis@4034d6f)) * **parameters:** Return an error instead of panicking on a non-string type field ([googleapis#3516](googleapis#3516)) ([66a0d53](googleapis@66a0d53)) * **source/looker:** Dynamically resolve public host URL ([googleapis#3603](googleapis#3603)) ([0428afd](googleapis@0428afd)) * **tool/looker-run-dashboard:** Add support for SQL Runner query tiles ([googleapis#3594](googleapis#3594)) ([0975d0a](googleapis@0975d0a)) --- 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> fbe2b21
github-actions Bot
pushed a commit
to pepe57/genai-toolbox
that referenced
this pull request
Jul 17, 2026
🤖 I have created a release *beep* *boop* --- ## [1.7.0](googleapis/mcp-toolbox@v1.6.0...v1.7.0) (2026-07-16) #### Features * Add `quotaProject` support for BigQuery and Looker conversational analytics ([googleapis#2610](googleapis#2610)) ([f3e7ca9](googleapis@f3e7ca9)) * **arcadedb:** Add arcadedb source and tools ([googleapis#2961](googleapis#2961)) ([351de00](googleapis@351de00)) * **cmd/internal,docs:** Add warning log that prebuilt tools are for developer use ([googleapis#3451](googleapis#3451)) ([8cffcef](googleapis@8cffcef)) * **source/postgres:** Add optional connectTimeout ([googleapis#3620](googleapis#3620)) ([b574b07](googleapis@b574b07)) * **tool/clickhouse-sql:** Add native vector embedding support ([googleapis#3229](googleapis#3229)) ([6cbe1c2](googleapis@6cbe1c2)) * **tool/dataplex-update-data-product,tool/dataplex-create-data-asset,tool/dataplex-update-data-asset:** Add update data product, create data asset, and update data asset tools for knowledge catalog source ([googleapis#3574](googleapis#3574)) ([721c204](googleapis@721c204)) * **tools/dataplex-create-data-product:** Add dataplex-create-data-product tool ([googleapis#3504](googleapis#3504)) ([5cee0d2](googleapis@5cee0d2)) * **tools/dataplex-get-data-asset:** Add dataplex-get-data-asset tool ([googleapis#3503](googleapis#3503)) ([1ddfbe9](googleapis@1ddfbe9)) ### Bug Fixes * **parameters:** Report the offending value in array/map type errors ([googleapis#3512](googleapis#3512)) ([4034d6f](googleapis@4034d6f)) * **parameters:** Return an error instead of panicking on a non-string type field ([googleapis#3516](googleapis#3516)) ([66a0d53](googleapis@66a0d53)) * **source/looker:** Dynamically resolve public host URL ([googleapis#3603](googleapis#3603)) ([0428afd](googleapis@0428afd)) * **tool/looker-run-dashboard:** Add support for SQL Runner query tiles ([googleapis#3594](googleapis#3594)) ([0975d0a](googleapis@0975d0a)) --- 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> fbe2b21
github-actions Bot
pushed a commit
to CaffeeLake/genai-toolbox
that referenced
this pull request
Jul 17, 2026
🤖 I have created a release *beep* *boop* --- ## [1.7.0](googleapis/mcp-toolbox@v1.6.0...v1.7.0) (2026-07-16) #### Features * Add `quotaProject` support for BigQuery and Looker conversational analytics ([googleapis#2610](googleapis#2610)) ([f3e7ca9](googleapis@f3e7ca9)) * **arcadedb:** Add arcadedb source and tools ([googleapis#2961](googleapis#2961)) ([351de00](googleapis@351de00)) * **cmd/internal,docs:** Add warning log that prebuilt tools are for developer use ([googleapis#3451](googleapis#3451)) ([8cffcef](googleapis@8cffcef)) * **source/postgres:** Add optional connectTimeout ([googleapis#3620](googleapis#3620)) ([b574b07](googleapis@b574b07)) * **tool/clickhouse-sql:** Add native vector embedding support ([googleapis#3229](googleapis#3229)) ([6cbe1c2](googleapis@6cbe1c2)) * **tool/dataplex-update-data-product,tool/dataplex-create-data-asset,tool/dataplex-update-data-asset:** Add update data product, create data asset, and update data asset tools for knowledge catalog source ([googleapis#3574](googleapis#3574)) ([721c204](googleapis@721c204)) * **tools/dataplex-create-data-product:** Add dataplex-create-data-product tool ([googleapis#3504](googleapis#3504)) ([5cee0d2](googleapis@5cee0d2)) * **tools/dataplex-get-data-asset:** Add dataplex-get-data-asset tool ([googleapis#3503](googleapis#3503)) ([1ddfbe9](googleapis@1ddfbe9)) ### Bug Fixes * **parameters:** Report the offending value in array/map type errors ([googleapis#3512](googleapis#3512)) ([4034d6f](googleapis@4034d6f)) * **parameters:** Return an error instead of panicking on a non-string type field ([googleapis#3516](googleapis#3516)) ([66a0d53](googleapis@66a0d53)) * **source/looker:** Dynamically resolve public host URL ([googleapis#3603](googleapis#3603)) ([0428afd](googleapis@0428afd)) * **tool/looker-run-dashboard:** Add support for SQL Runner query tiles ([googleapis#3594](googleapis#3594)) ([0975d0a](googleapis@0975d0a)) --- 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> fbe2b21
github-actions Bot
pushed a commit
to bhardwajRahul/genai-toolbox
that referenced
this pull request
Jul 17, 2026
🤖 I have created a release *beep* *boop* --- ## [1.7.0](googleapis/mcp-toolbox@v1.6.0...v1.7.0) (2026-07-16) #### Features * Add `quotaProject` support for BigQuery and Looker conversational analytics ([googleapis#2610](googleapis#2610)) ([f3e7ca9](googleapis@f3e7ca9)) * **arcadedb:** Add arcadedb source and tools ([googleapis#2961](googleapis#2961)) ([351de00](googleapis@351de00)) * **cmd/internal,docs:** Add warning log that prebuilt tools are for developer use ([googleapis#3451](googleapis#3451)) ([8cffcef](googleapis@8cffcef)) * **source/postgres:** Add optional connectTimeout ([googleapis#3620](googleapis#3620)) ([b574b07](googleapis@b574b07)) * **tool/clickhouse-sql:** Add native vector embedding support ([googleapis#3229](googleapis#3229)) ([6cbe1c2](googleapis@6cbe1c2)) * **tool/dataplex-update-data-product,tool/dataplex-create-data-asset,tool/dataplex-update-data-asset:** Add update data product, create data asset, and update data asset tools for knowledge catalog source ([googleapis#3574](googleapis#3574)) ([721c204](googleapis@721c204)) * **tools/dataplex-create-data-product:** Add dataplex-create-data-product tool ([googleapis#3504](googleapis#3504)) ([5cee0d2](googleapis@5cee0d2)) * **tools/dataplex-get-data-asset:** Add dataplex-get-data-asset tool ([googleapis#3503](googleapis#3503)) ([1ddfbe9](googleapis@1ddfbe9)) ### Bug Fixes * **parameters:** Report the offending value in array/map type errors ([googleapis#3512](googleapis#3512)) ([4034d6f](googleapis@4034d6f)) * **parameters:** Return an error instead of panicking on a non-string type field ([googleapis#3516](googleapis#3516)) ([66a0d53](googleapis@66a0d53)) * **source/looker:** Dynamically resolve public host URL ([googleapis#3603](googleapis#3603)) ([0428afd](googleapis@0428afd)) * **tool/looker-run-dashboard:** Add support for SQL Runner query tiles ([googleapis#3594](googleapis#3594)) ([0975d0a](googleapis@0975d0a)) --- 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> fbe2b21
github-actions Bot
pushed a commit
to CrazyForks/genai-toolbox
that referenced
this pull request
Jul 17, 2026
🤖 I have created a release *beep* *boop* --- ## [1.7.0](googleapis/mcp-toolbox@v1.6.0...v1.7.0) (2026-07-16) #### Features * Add `quotaProject` support for BigQuery and Looker conversational analytics ([googleapis#2610](googleapis#2610)) ([f3e7ca9](googleapis@f3e7ca9)) * **arcadedb:** Add arcadedb source and tools ([googleapis#2961](googleapis#2961)) ([351de00](googleapis@351de00)) * **cmd/internal,docs:** Add warning log that prebuilt tools are for developer use ([googleapis#3451](googleapis#3451)) ([8cffcef](googleapis@8cffcef)) * **source/postgres:** Add optional connectTimeout ([googleapis#3620](googleapis#3620)) ([b574b07](googleapis@b574b07)) * **tool/clickhouse-sql:** Add native vector embedding support ([googleapis#3229](googleapis#3229)) ([6cbe1c2](googleapis@6cbe1c2)) * **tool/dataplex-update-data-product,tool/dataplex-create-data-asset,tool/dataplex-update-data-asset:** Add update data product, create data asset, and update data asset tools for knowledge catalog source ([googleapis#3574](googleapis#3574)) ([721c204](googleapis@721c204)) * **tools/dataplex-create-data-product:** Add dataplex-create-data-product tool ([googleapis#3504](googleapis#3504)) ([5cee0d2](googleapis@5cee0d2)) * **tools/dataplex-get-data-asset:** Add dataplex-get-data-asset tool ([googleapis#3503](googleapis#3503)) ([1ddfbe9](googleapis@1ddfbe9)) ### Bug Fixes * **parameters:** Report the offending value in array/map type errors ([googleapis#3512](googleapis#3512)) ([4034d6f](googleapis@4034d6f)) * **parameters:** Return an error instead of panicking on a non-string type field ([googleapis#3516](googleapis#3516)) ([66a0d53](googleapis@66a0d53)) * **source/looker:** Dynamically resolve public host URL ([googleapis#3603](googleapis#3603)) ([0428afd](googleapis@0428afd)) * **tool/looker-run-dashboard:** Add support for SQL Runner query tiles ([googleapis#3594](googleapis#3594)) ([0975d0a](googleapis@0975d0a)) --- 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> fbe2b21
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
ArrayParameter.ParseandMapParameter.Parseconstruct theirParseTypeErrorfrom the variable produced by the type assertion (arrVal/m). But that branch is only reached after the assertion has failed, so the variable is always the nil zero value. The resulting error drops the value the caller actually passed:[] not type "array"map[] not type "map"Every other
Parseimplementation (StringParameter,IntParameter,FloatParameter,BooleanParameter, …) passes the originalvtoParseTypeError; these two had just drifted out of line. Passingvin both restores the actual input in the message:"not-an-array" not type "array""not-a-map" not type "map"Added
TestParseTypeErrorReportsValue, which asserts the array/map type errors name the offending value. It fails onmainand passes with this change.PR Checklist
go test ./internal/util/parameters/,go vet,gofmt -l)Didn't file a separate issue first since this is a small, self-contained consistency fix; happy to open one if you'd prefer to track it.