Title: Feat: Error handling on the Backend to report human errors · Issue #1983 · coder/coder · GitHub
Open Graph Title: Feat: Error handling on the Backend to report human errors · Issue #1983 · coder/coder
X Title: Feat: Error handling on the Backend to report human errors · Issue #1983 · coder/coder
Description: What is your suggestion? Ensure backend errors returned to the UI are human readable. Currently we elevate err.Error() a lot, which is not a good UI experience. httpapi.Write(rw, http.StatusForbidden, httpapi.Response{ Message: "Human me...
Open Graph Description: What is your suggestion? Ensure backend errors returned to the UI are human readable. Currently we elevate err.Error() a lot, which is not a good UI experience. httpapi.Write(rw, http.StatusForbidd...
X Description: What is your suggestion? Ensure backend errors returned to the UI are human readable. Currently we elevate err.Error() a lot, which is not a good UI experience. httpapi.Write(rw, http.StatusForbidd...
Opengraph URL: https://github.com/coder/coder/issues/1983
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Feat: Error handling on the Backend to report human errors","articleBody":"## What is your suggestion?\r\n\r\nEnsure backend errors returned to the UI are human readable. Currently we elevate `err.Error()` a lot, which is not a good UI experience.\r\n\r\n```golang\r\nhttpapi.Write(rw, http.StatusForbidden, httpapi.Response{\r\n Message: \"Human message here\",\r\n Internal: err.Error(),\r\n})\r\n```\r\n\r\n## Why do you want this feature?\r\n\r\nSo the backend can send appropriate errors over to the frontend.\r\n\r\nThis was a consequence of 2 cases (suspended user login and ...?...) where the backend error had more details than the FE.\r\n\r\n## Are there any workarounds to get this functionality today?\r\n\r\nNo\r\n\r\n## Are you interested in submitting a PR for this?\r\n\r\nYes","author":{"url":"https://github.com/Emyrk","@type":"Person","name":"Emyrk"},"datePublished":"2022-06-02T15:19:20Z","url":"https://github.com/coder/coder/issues/1983"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| 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:ae38b712-f112-45ee-5790-d4b32e192fd6 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 83AA:10531B:15CA07A:1BCFD8E:6B01769D |
| html-safe-nonce | b56bd00a4a39ff518e7dcfb8380b8a160ff9381f757dc6be6d929f7e0914d03a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4M0FBOjEwNTMxQjoxNUNBMDdBOjFCQ0ZEOEU6NkIwMTc2OUQiLCJ2aXNpdG9yX2lkIjoiNjE0NjE5MzU3MjEyMDA2NTY5MyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | ae66169b369ec7fcf3b778ebf4bfa288ce5b725d0b6d4dbb08e820c78b5e2699 |
| hovercard-subject-tag | issue:1258334700 |
| 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/coder/coder/1983/issue_layout |
| twitter:image | https://opengraph.githubassets.com/503424fbb63a0e9b5d01020434920bbe8da73a37691d6384561e80b7c04a8641/coder/coder/issues/1983 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/503424fbb63a0e9b5d01020434920bbe8da73a37691d6384561e80b7c04a8641/coder/coder/issues/1983 |
| og:image:alt | What is your suggestion? Ensure backend errors returned to the UI are human readable. Currently we elevate err.Error() a lot, which is not a good UI experience. httpapi.Write(rw, http.StatusForbidd... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Emyrk |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-preview |
| go-import | github.com/coder/coder git https://github.com/coder/coder.git |
| octolytics-dimension-user_id | 95932066 |
| octolytics-dimension-user_login | coder |
| octolytics-dimension-repository_id | 440752086 |
| octolytics-dimension-repository_nwo | coder/coder |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 440752086 |
| octolytics-dimension-repository_network_root_nwo | coder/coder |
| 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 | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width