chore: update googleapis and regenerate#17313
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates several Google Cloud client libraries, introducing new types, services, and configuration options across packages like google-ads-datamanager, google-cloud-container, google-cloud-dataplex, google-cloud-dlp, google-cloud-geminidataanalytics, and google-cloud-network-security. Key additions include new entry modification and access request APIs in Dataplex, conversation-related types in DLP, and new security services in Network Security. The review feedback highlights multiple instances of broad, empty exception handling blocks in the generated REST transports that silently assign None on serialization failures, recommending that these exceptions be logged to prevent masking underlying issues.
| try: | ||
| request_payload = type(request).to_json(request) | ||
| except: | ||
| request_payload = None |
There was a problem hiding this comment.
Avoid broad except Exception: blocks that silently assign None. Instead, log the exception (e.g., using logger.warning) to aid in debugging and prevent masking underlying issues.
try:
request_payload = type(request).to_json(request)
except Exception as e:
logger.warning("Failed to serialize request to JSON: %s", e)
request_payload = NoneReferences
- Avoid broad except Exception: blocks that silently return None. Instead, log the exception (e.g., using logger.warning) to aid in debugging and prevent masking underlying issues.
| try: | ||
| response_payload = catalog.Entry.to_json(response) | ||
| except: | ||
| response_payload = None |
There was a problem hiding this comment.
Avoid broad except Exception: blocks that silently assign None. Instead, log the exception (e.g., using logger.warning) to aid in debugging and prevent masking underlying issues.
try:
response_payload = catalog.Entry.to_json(response)
except Exception as e:
logger.warning("Failed to serialize response to JSON: %s", e)
response_payload = NoneReferences
- Avoid broad except Exception: blocks that silently return None. Instead, log the exception (e.g., using logger.warning) to aid in debugging and prevent masking underlying issues.
| request_url = "{host}{uri}".format( | ||
| host=self._host, uri=transcoded_request["uri"] | ||
| ) | ||
| method = transcoded_request["method"] |
There was a problem hiding this comment.
Avoid broad except Exception: blocks that silently assign None. Instead, log the exception (e.g., using logger.warning) to aid in debugging and prevent masking underlying issues.
| request_url = "{host}{uri}".format( | |
| host=self._host, uri=transcoded_request["uri"] | |
| ) | |
| method = transcoded_request["method"] | |
| try: | |
| request_payload = type(request).to_json(request) | |
| except Exception as e: | |
| logger.warning("Failed to serialize request to JSON: %s", e) | |
| request_payload = None |
References
- Avoid broad except Exception: blocks that silently return None. Instead, log the exception (e.g., using logger.warning) to aid in debugging and prevent masking underlying issues.
| try: | ||
| response_payload = ( | ||
| data_products.RequestDataProductAccessResponse.to_json(response) | ||
| ) | ||
| except: | ||
| response_payload = None |
There was a problem hiding this comment.
Avoid broad except Exception: blocks that silently assign None. Instead, log the exception (e.g., using logger.warning) to aid in debugging and prevent masking underlying issues.
try:
response_payload = (
data_products.RequestDataProductAccessResponse.to_json(response)
)
except Exception as e:
logger.warning("Failed to serialize response to JSON: %s", e)
response_payload = NoneReferences
- Avoid broad except Exception: blocks that silently return None. Instead, log the exception (e.g., using logger.warning) to aid in debugging and prevent masking underlying issues.
| try: | ||
| request_payload = type(request).to_json(request) | ||
| except: | ||
| request_payload = None |
There was a problem hiding this comment.
Avoid broad except Exception: blocks that silently assign None. Instead, log the exception (e.g., using logger.warning) to aid in debugging and prevent masking underlying issues.
try:
request_payload = type(request).to_json(request)
except Exception as e:
logger.warning("Failed to serialize request to JSON: %s", e)
request_payload = NoneReferences
- Avoid broad except Exception: blocks that silently return None. Instead, log the exception (e.g., using logger.warning) to aid in debugging and prevent masking underlying issues.
| try: | ||
| response_payload = datascans.CancelDataScanJobResponse.to_json( | ||
| response | ||
| ) | ||
| except: | ||
| response_payload = None |
There was a problem hiding this comment.
Avoid broad except Exception: blocks that silently assign None. Instead, log the exception (e.g., using logger.warning) to aid in debugging and prevent masking underlying issues.
try:
response_payload = datascans.CancelDataScanJobResponse.to_json(
response
)
except Exception as e:
logger.warning("Failed to serialize response to JSON: %s", e)
response_payload = NoneReferences
- Avoid broad except Exception: blocks that silently return None. Instead, log the exception (e.g., using logger.warning) to aid in debugging and prevent masking underlying issues.
Update googleapis to the latest commit and regenerate all client libraries.