Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

@saurabh-pingale
Copy link

This PR introduces enhancements to the protobuf-generated files by adding a default case handling mechanism in the generated pbjs code.

Enhancement: #1106

Changes Introduced

  • Added default case in the generated header section to handle unexpected enum values.
  • Ensures safer parsing and avoids runtime issues when new/unknown values are encountered.

Screenshots & References

  1. Proto file used for testing (test.proto)
Screenshot 2025-08-18 202730
  1. Command used to generate pbjs file
pbjs -t static-module -w commonjs -o test.js test.proto
  1. Generated file showing default case in header
Screenshot 2025-08-18 202723

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.

1 participant

Morty Proxy This is a proxified and sanitized view of the page, visit original site.