Title: Error details are not available · Issue #26 · contentstack/contentstack-java · GitHub
Open Graph Title: Error details are not available · Issue #26 · contentstack/contentstack-java
X Title: Error details are not available · Issue #26 · contentstack/contentstack-java
Description: When a call to the content delivery API fails, the response contains a JSON object with details such as the error code, error message, and failed validation, as seen below: { "error_code": 141, "error_message": "Failed to fetch entries. ...
Open Graph Description: When a call to the content delivery API fails, the response contains a JSON object with details such as the error code, error message, and failed validation, as seen below: { "error_code": 141, "er...
X Description: When a call to the content delivery API fails, the response contains a JSON object with details such as the error code, error message, and failed validation, as seen below: { "error_code"...
Opengraph URL: https://github.com/contentstack/contentstack-java/issues/26
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Error details are not available","articleBody":"When a call to the content delivery API fails, the response contains a JSON object with details such as the error code, error message, and failed validation, as seen below:\r\n```json\r\n{\r\n \"error_code\": 141,\r\n \"error_message\": \"Failed to fetch entries. Please try again with valid parameters.\", \r\n \"errors\": {\r\n \"access_token\": [\r\n \"Doesn't have access to specified environment\"\r\n ]\r\n }\r\n}\r\n```\r\n\r\nThe same call, when made through the SDK, provides none of the error information to the caller. The only response obtained is an `Error` object, with the HTTP status code as the error code and the status message as the error message, repeating the exact same information for the errors, resulting in something that could be seen as the following:\r\n```json\r\n{\r\n \"error_code\": 422,\r\n \"error_message\": \"Unprocessable Entity\",\r\n \"errors\": {\r\n \"errors\": \"Unprocessable Entity\"\r\n }\r\n}\r\n```\r\n\r\nThat `Error` object completely discards the error details, making effective error handling impossible; there is no way to extract that information once the SDK calls back to user code. Contrast this with the SDKs provided for other languages. The .NET SDK parses the response JSON and uses those values to fill in the `Error` object. Is there any sort of plan for exposing the actual error details to the caller?","author":{"url":"https://github.com/feliperuiz","@type":"Person","name":"feliperuiz"},"datePublished":"2021-01-20T17:31:22.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/26/contentstack-java/issues/26"}
| 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:77e1cc2c-0d93-0712-f40b-ca3b6fed805a |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D7A4:22EFB2:C6B5C4:101ECB4:698025A1 |
| html-safe-nonce | fd6926e178e8a34b3a4a67c3570b174aeb7fc2faa04c0e89dc025fc544828ac6 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEN0E0OjIyRUZCMjpDNkI1QzQ6MTAxRUNCNDo2OTgwMjVBMSIsInZpc2l0b3JfaWQiOiI2NjU2MzU0ODA0MDM1NDk1MzI5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 6bf44b349fb65f2b6be034fc552b9f986276df5866efb9ead1cd51bdc2a82708 |
| hovercard-subject-tag | issue:790179092 |
| 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/contentstack/contentstack-java/26/issue_layout |
| twitter:image | https://opengraph.githubassets.com/cbd95dc5f0a753565eab7b27cd0b538fa67fb712ea946d0053900fca870ab743/contentstack/contentstack-java/issues/26 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/cbd95dc5f0a753565eab7b27cd0b538fa67fb712ea946d0053900fca870ab743/contentstack/contentstack-java/issues/26 |
| og:image:alt | When a call to the content delivery API fails, the response contains a JSON object with details such as the error code, error message, and failed validation, as seen below: { "error_code": 141, "er... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | feliperuiz |
| hostname | github.com |
| expected-hostname | github.com |
| None | 60279d4097367e16897439d16d6bbe4180663db828c666eeed2656988ffe59f6 |
| turbo-cache-control | no-preview |
| go-import | github.com/contentstack/contentstack-java git https://github.com/contentstack/contentstack-java.git |
| octolytics-dimension-user_id | 24450751 |
| octolytics-dimension-user_login | contentstack |
| octolytics-dimension-repository_id | 106927781 |
| octolytics-dimension-repository_nwo | contentstack/contentstack-java |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 106927781 |
| octolytics-dimension-repository_network_root_nwo | contentstack/contentstack-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 | 7c85641c598ad130c74f7bcc27f58575cac69551 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width