Skip to content

fix: pass forward debugger properties on exception - #989

Merged
robertvoinescu-work merged 1 commit into
googleapis:mainfrom
robertvoinescu-work:fix/errorMessage
Jul 30, 2026
Merged

fix: pass forward debugger properties on exception#989
robertvoinescu-work merged 1 commit into
googleapis:mainfrom
robertvoinescu-work:fix/errorMessage

Conversation

@robertvoinescu-work

@robertvoinescu-work robertvoinescu-work commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

On exception we will get misleading error messages from protoc compiler if these are not passed forward. Note the specified properties are [DebuggerNonUserCode]:

Before (has misleading message to add support for optional fields):

2026-07-30T16:24:49.863Z Generating Google.Cloud.Sql.V1
google/cloud/sql/v1/cloud_sql_users.proto: is a proto3 file that contains optional fields, but code 
generator protoc-gen-gapic hasn't been updated to support optional fields in proto3. 
Please ask the owner of this code generator to support proto3 optional.
   --gapic_out: System.InvalidOperationException: Not all patterns can be matched to a parent
 resource for field CreateBackupRequest.parent
 

After:

2026-07-30T16:26:20.374Z Generating Google.Cloud.Sql.V1
    --gapic_out: System.InvalidOperationException: Not all patterns can be matched to a parent
  resource for field CreateBackupRequest.parent

b/540852437

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

Copy link
Copy Markdown

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 the initialization of CodeGeneratorResponse in Google.Api.Generator/Program.cs by extracting the supported features, minimum edition, and maximum edition values into private constants. These constants are now consistently applied to both the successful and failure response generation paths. There are no review comments, and the changes are clean and correct, so I have no feedback to provide.

@robertvoinescu-work robertvoinescu-work changed the title fix: pass forward debugger properties fix: pass forward debugger properties on exception Jul 30, 2026
@amanda-tarafa

Copy link
Copy Markdown
Contributor

Merge this one as is, but @efevans can you take a look at the zizmor check failures and fix them on a separate PR?

@robertvoinescu-work
robertvoinescu-work merged commit 4c33255 into googleapis:main Jul 30, 2026
9 of 11 checks passed
@efevans

efevans commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Merge this one as is, but @efevans can you take a look at the zizmor check failures and fix them on a separate PR?

Will do

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.

3 participants