Title: Consistently display error messages from backend · Issue #1943 · coder/coder · GitHub
Open Graph Title: Consistently display error messages from backend · Issue #1943 · coder/coder
X Title: Consistently display error messages from backend · Issue #1943 · coder/coder
Description: As was done in the usersXService, we should go through the frontend and make sure all error messages from the API are being unpacked properly to avoid over-reliance on default error messages, or displaying unhelpful error messages (the e...
Open Graph Description: As was done in the usersXService, we should go through the frontend and make sure all error messages from the API are being unpacked properly to avoid over-reliance on default error messages, or di...
X Description: As was done in the usersXService, we should go through the frontend and make sure all error messages from the API are being unpacked properly to avoid over-reliance on default error messages, or di...
Opengraph URL: https://github.com/coder/coder/issues/1943
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Consistently display error messages from backend ","articleBody":"As was done in the `usersXService`, we should go through the frontend and make sure all error messages from the API are being unpacked properly to avoid over-reliance on default error messages, or displaying unhelpful error messages (the error has a less helpful message than the response). `getErrorMessage` and `getFormErrors` help with this.\r\n\r\n## To be done\r\n\r\n- [x] convert this to an epic\r\n- [x] create issues for each XService\r\n\r\n## Problem\r\nThe frontend does not always display the error messages sent from the backend, and even when it does, it does not display the `detail` that is sometimes sent along with it. \r\n\r\n## Definition of done for each ticket\r\n- There are no uses of `displayError` in this XService. To replace the error snackbar, render `ErrorSummary` in the relevant components with the `dismissible` prop. This way, the user can expand the error detail if desired without the snackbar disappearing on them.\r\n- There are no uses of `getFormHelpers` in the relevant components; switch to `getFormHelpersWithError` even if no error. (We will eventually rename it to replace the original `getFormHelpers`.)\r\n- The XService always `assign`s the API error, rather than a hard-coded error message. If a hard-coded error message is needed as a fallback, send it as a prop to `ErrorSummary`.\r\n- Errors are only unpacked in `ErrorSummary` and `getFormHelpersWithError`.\r\n- Storybook has a story for when the error(s) are showing.\r\n\r\n## Tickets\r\n\r\n- [x] #3106\r\n- [x] #3088\r\n- [x] #3097 \r\n- [x] #3094\r\n- [x] #3096 \r\n- [x] #3095 \r\n- [x] #3093 \r\n- [x] #3091 \r\n- [x] #3090 \r\n- [x] #3089 \r\n- [x] #3209\r\n- [x] #3343","author":{"url":"https://github.com/presleyp","@type":"Person","name":"presleyp"},"datePublished":"2022-06-01T13:55:42Z","url":"https://github.com/coder/coder/issues/1943"}
| 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:050ed95c-2f5a-d59d-db4c-fdb20bab46b1 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E270:399E4B:25FFD76:326A8C9:6B019A55 |
| html-safe-nonce | f0f238e8a9f0093e24b6612de25279571b723058f3d35a8500e1944385bb25e9 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMjcwOjM5OUU0QjoyNUZGRDc2OjMyNkE4Qzk6NkIwMTlBNTUiLCJ2aXNpdG9yX2lkIjoiNTEwNDAzNTI4NDA1MjQ0OTg3OCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 450908a4f91127e8585bb46724fa125c569e43caf65a13610fa08c2b16f6ce32 |
| hovercard-subject-tag | issue:1256071572 |
| 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/1943/issue_layout |
| twitter:image | https://opengraph.githubassets.com/cae6311c164b945c10555eb6a9cda2e861ca01c7db1a3bfa4e4771964614a375/coder/coder/issues/1943 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/cae6311c164b945c10555eb6a9cda2e861ca01c7db1a3bfa4e4771964614a375/coder/coder/issues/1943 |
| og:image:alt | As was done in the usersXService, we should go through the frontend and make sure all error messages from the API are being unpacked properly to avoid over-reliance on default error messages, or di... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | presleyp |
| 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