-
Notifications
You must be signed in to change notification settings - Fork 1.6k
chore: librarian update image pull request: 20260204T233015Z #15527
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -492,7 +492,7 @@ def __call__( | |
| ) | ||
| method = transcoded_request["method"] | ||
| try: | ||
| request_payload = json_format.MessageToJson(request) | ||
| request_payload = type(request).to_json(request) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The following line uses a bare |
||
| except: | ||
| request_payload = None | ||
| http_request = { | ||
|
|
@@ -653,7 +653,7 @@ def __call__( | |
| ) | ||
| method = transcoded_request["method"] | ||
| try: | ||
| request_payload = json_format.MessageToJson(request) | ||
| request_payload = type(request).to_json(request) | ||
| except: | ||
| request_payload = None | ||
| http_request = { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While this change to use
type(request).to_json(request)is an improvement, the following line uses a bareexcept:, which is discouraged. A bare except catches all exceptions, including system-exiting ones likeSystemExitandKeyboardInterrupt, which can hide critical bugs and make debugging difficult. It is recommended to catch a more specific exception, such asexcept Exception:. This feedback applies to all similartry...exceptblocks modified in this pull request.