Title: Move some exception translation logic to BaseServiceException · Issue #413 · googleapis/google-cloud-java · GitHub
Open Graph Title: Move some exception translation logic to BaseServiceException · Issue #413 · googleapis/google-cloud-java
X Title: Move some exception translation logic to BaseServiceException · Issue #413 · googleapis/google-cloud-java
Description: In DefaultStorageRpc (and also other services as DefaultBigQueryRpc) we have code handling the translation of IOException to service specific exceptions: private static BigQueryException translate(IOException exception) { BigQueryExcepti...
Open Graph Description: In DefaultStorageRpc (and also other services as DefaultBigQueryRpc) we have code handling the translation of IOException to service specific exceptions: private static BigQueryException translate(...
X Description: In DefaultStorageRpc (and also other services as DefaultBigQueryRpc) we have code handling the translation of IOException to service specific exceptions: private static BigQueryException translate(...
Opengraph URL: https://github.com/googleapis/google-cloud-java/issues/413
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Move some exception translation logic to BaseServiceException","articleBody":"In `DefaultStorageRpc` (and also other services as `DefaultBigQueryRpc`) we have code handling the translation of `IOException` to service specific exceptions:\n\n``` java\nprivate static BigQueryException translate(IOException exception) {\n BigQueryException translated;\n if (exception instanceof GoogleJsonResponseException\n \u0026\u0026 ((GoogleJsonResponseException) exception).getDetails() != null) {\n translated = translate(((GoogleJsonResponseException) exception).getDetails());\n } else {\n translated =\n new BigQueryException(BigQueryException.UNKNOWN_CODE, exception.getMessage(), false);\n }\n translated.initCause(exception);\n return translated;\n}\n\nprivate static BigQueryException translate(GoogleJsonError exception) {\n boolean retryable = RETRYABLE_CODES.contains(exception.getCode());\n return new BigQueryException(exception.getCode(), exception.getMessage(), retryable);\n}\n```\n\nPart of this logic should be moved to `BaseServiceException`\n","author":{"url":"https://github.com/mziccard","@type":"Person","name":"mziccard"},"datePublished":"2015-11-24T10:02:41.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":7},"url":"https://github.com/413/google-cloud-java/issues/413"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:911ed558-3278-0608-3b0b-6d439d85a58a |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E86E:C4224:19732D:2211CD:6A4D9547 |
| html-safe-nonce | 2e800b9bdd5564048dff4d0a1420bbd0244b537ec6d1ed76ef35ac0cb534f966 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFODZFOkM0MjI0OjE5NzMyRDoyMjExQ0Q6NkE0RDk1NDciLCJ2aXNpdG9yX2lkIjoiNTk3NjU1NTg4ODc2ODI5MjE2NyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 5ef278ab256822fe19968d9b7ffc312c6250ad1b12a3db8fff3c8504de14ab1b |
| hovercard-subject-tag | issue:118571628 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/googleapis/google-cloud-java/413/issue_layout |
| twitter:image | https://opengraph.githubassets.com/c2c94aadcc375a50e14efb2ba31eec4f65356afb01eee512bac6964eef924862/googleapis/google-cloud-java/issues/413 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/c2c94aadcc375a50e14efb2ba31eec4f65356afb01eee512bac6964eef924862/googleapis/google-cloud-java/issues/413 |
| og:image:alt | In DefaultStorageRpc (and also other services as DefaultBigQueryRpc) we have code handling the translation of IOException to service specific exceptions: private static BigQueryException translate(... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mziccard |
| hostname | github.com |
| expected-hostname | github.com |
| None | 06b8a6144231bf3a234f1c2e9993861e07ce98a905912b114aa386c2d7e84b33 |
| turbo-cache-control | no-preview |
| go-import | github.com/googleapis/google-cloud-java git https://github.com/googleapis/google-cloud-java.git |
| octolytics-dimension-user_id | 16785467 |
| octolytics-dimension-user_login | googleapis |
| octolytics-dimension-repository_id | 26181278 |
| octolytics-dimension-repository_nwo | googleapis/google-cloud-java |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 26181278 |
| octolytics-dimension-repository_network_root_nwo | googleapis/google-cloud-java |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 74e2a9c78f1e38588de4f25885878349d721eedf |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width