Skip to content

feat: add error helper that does not read the response body#2964

Merged
codyoss merged 3 commits intogoogleapis:mainfrom
bjohnso5:add-checkresponse-with-body-helper
Jan 17, 2025
Merged

feat: add error helper that does not read the response body#2964
codyoss merged 3 commits intogoogleapis:mainfrom
bjohnso5:add-checkresponse-with-body-helper

Conversation

@bjohnso5
Copy link
Copy Markdown
Contributor

Adds a new CheckResponseWithBody variant to allow returning *googleapi.Error details for responses where the body may have already been read.

Fixes googleapis/google-cloud-go#11458 (Part 1 of 2).

Comment thread googleapi/googleapi.go
@codyoss codyoss added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 16, 2025
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 16, 2025
@codyoss
Copy link
Copy Markdown
Member

codyoss commented Jan 16, 2025

Thanks for the detailed report and contribution!

@bjohnso5
Copy link
Copy Markdown
Contributor Author

@codyoss is there anything I can do re: the kokoro failures? It's not clear what the failure actually was based on the output I see.

@codyoss codyoss added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 16, 2025
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 16, 2025
@codyoss codyoss added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 16, 2025
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 16, 2025
@codyoss codyoss added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 17, 2025
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 17, 2025
@codyoss codyoss added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 17, 2025
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 17, 2025
@codyoss codyoss merged commit 9e749c4 into googleapis:main Jan 17, 2025
gcf-merge-on-green Bot pushed a commit that referenced this pull request Jan 22, 2025
🤖 I have created a release *beep* *boop*
---


## [0.218.0](https://togithub.com/googleapis/google-api-go-client/compare/v0.217.0...v0.218.0) (2025-01-22)


### Features

* Add error helper that does not read the response body ([#2964](https://togithub.com/googleapis/google-api-go-client/issues/2964)) ([9e749c4](https://togithub.com/googleapis/google-api-go-client/commit/9e749c4155022ced228d0989315f21b40b43af5c))
* **all:** Auto-regenerate discovery clients ([#2963](https://togithub.com/googleapis/google-api-go-client/issues/2963)) ([0bf19b3](https://togithub.com/googleapis/google-api-go-client/commit/0bf19b3736d5fc9b329e2fc73f7b45c79911373f))
* **all:** Auto-regenerate discovery clients ([#2967](https://togithub.com/googleapis/google-api-go-client/issues/2967)) ([a978c49](https://togithub.com/googleapis/google-api-go-client/commit/a978c49382816b1011c2f5eaeaee5e0ff7741f94))
* **all:** Auto-regenerate discovery clients ([#2969](https://togithub.com/googleapis/google-api-go-client/issues/2969)) ([a8aed4d](https://togithub.com/googleapis/google-api-go-client/commit/a8aed4dd688bcbc6e44b43211c58e5e09bb772e5))
* **all:** Auto-regenerate discovery clients ([#2970](https://togithub.com/googleapis/google-api-go-client/issues/2970)) ([607d371](https://togithub.com/googleapis/google-api-go-client/commit/607d371e04db7b53fb6d6327bb4ac770dac7d772))
* **all:** Auto-regenerate discovery clients ([#2972](https://togithub.com/googleapis/google-api-go-client/issues/2972)) ([0f4ee9d](https://togithub.com/googleapis/google-api-go-client/commit/0f4ee9d9b0f08d935da8bc5c8169e24b462307a3))
* **all:** Auto-regenerate discovery clients ([#2973](https://togithub.com/googleapis/google-api-go-client/issues/2973)) ([e143e5c](https://togithub.com/googleapis/google-api-go-client/commit/e143e5cadc749d877a27ba41b5b954fca3195776))
* **all:** Auto-regenerate discovery clients ([#2974](https://togithub.com/googleapis/google-api-go-client/issues/2974)) ([0d0bcdf](https://togithub.com/googleapis/google-api-go-client/commit/0d0bcdffc9017f5647b78b1405940c330578b3a1))


### Bug Fixes

* **internal/gensupport:** Close resp body only on discarding resp (resumableupload) ([#2966](https://togithub.com/googleapis/google-api-go-client/issues/2966)) ([840d496](https://togithub.com/googleapis/google-api-go-client/commit/840d49666b8c5e8ca1c07880cb6be2f0b78fbd6d))

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

compute: field validation errors are stripped of their detail

4 participants