refactor(spec): Update HTTP+JSON error mapping to use google.rpc.Status AIP-193#1600
refactor(spec): Update HTTP+JSON error mapping to use google.rpc.Status AIP-193#1600spetschulatSFDC merged 10 commits intoa2aproject:mainfrom
google.rpc.Status AIP-193#1600Conversation
For alignment with gRPC transcoding.
Summary of ChangesHello, 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 refines the specification for HTTP+JSON error responses by adopting the Highlights
Changelog
Activity
Using Gemini Code AssistThe 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
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 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
|
There was a problem hiding this comment.
Code Review
This pull request updates the specification to use google.rpc.Status for HTTP+JSON error responses, replacing the previous RFC 9457 Problem Details format. The changes in docs/specification.md accurately reflect this, including updates to the error mapping table and the error handling section with a new example. My review focuses on maintaining the clarity and consistency of the documentation. I've suggested restoring a couple of internal links for easier navigation and adjusting a key in an example to align with the project's JSON naming conventions.
Note: Security Review has been skipped due to the limited scope of the PR.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
|
I will add a note to align the data property of JSONRPC errors with the details property of status code. Need to confirm with @mikeas1 that removing the outer "error" member that AIP uses will not break transcoding. |
I will double check this today. |
|
I did a quick review of gRPC Gateway, Envoy, and .NET transcoding. All of these seem to directly transcode the google.rpc.Status value into the HTTP response body. gRPC Gateway supports registering a custom error transcoder, but I did not find an equivalent for Envoy. Google's transcoding system adheres to AIP-193, which puts it at odds with the others. I'm torn. Google is almost certainly going to be the primary user of gRPC transcoding, so aligning errors to match how that works is very useful. But this will make it harder for anyone else using transcoding to be adherent to the spec. However, it should be possible to be adherent, and with additional SDK support we can paper over this gap. So, I'm inclined to align the spec with AIP-193. |
google.rpc.Status AIP-193
google.rpc.Status AIP-193google.rpc.Status AIP-193
changes to the REST error format based on a2aproject/A2A#1600 spec changes
Updates the specification to require use of
google.rpc.Statusformatted JSON objects for error response bodies in HTTP+JSON mapping.See related issue for reasoning.
Fixes #1596