ZIm/crates
Conrad Irwin 1c2859d72b
collab errors (#4152)
One of the complaints of users on our first Hack call was that the error
messages you got when channel joining failed were not great.

This aims to fix that specific case, and lay the groundwork for future
improvements.

It adds two new methods to anyhow::Error

* `.error_code()` which returns a value from zed.proto (or
ErrorCode::Internal if the error has no specific tag)
* `.error_tag("key")` which returns the value of the tag (or None).

To construct errors with these fields set, you can use a builder API
based on the ErrorCode type:

* `Err(ErrorCode::Forbidden.anyhow())`
* `Err(ErrorCode::Forbidden.message("cannot join channel").into())` - to
add any context you want in the logs
* `Err(ErrorCode::WrongReleaseChannel.tag("required", "stable").into())`
- to add structured metadata to help the client handle the error better.


Release Notes:

- Improved error messaging when channel joining fails.
2024-01-24 23:23:58 -07:00
..
activity_indicator chore: Change AGPL-licensed crates to GPL (except for collab) (#4231) 2024-01-24 00:26:58 +01:00
ai Move interaction with keychain off the main thread 2024-01-24 14:53:05 +01:00
assets chore: Change AGPL-licensed crates to GPL (except for collab) (#4231) 2024-01-24 00:26:58 +01:00
assistant Allow prompts to have detail, and use for good 2024-01-24 23:15:37 -07:00
audio chore: Change AGPL-licensed crates to GPL (except for collab) (#4231) 2024-01-24 00:26:58 +01:00
auto_update Allow prompts to have detail, and use for good 2024-01-24 23:15:37 -07:00
breadcrumbs chore: Change AGPL-licensed crates to GPL (except for collab) (#4231) 2024-01-24 00:26:58 +01:00
call chore: Change AGPL-licensed crates to GPL (except for collab) (#4231) 2024-01-24 00:26:58 +01:00
channel Allow completions of everyone in the call 2024-01-24 10:51:46 -07:00
cli chore: Change AGPL-licensed crates to GPL (except for collab) (#4231) 2024-01-24 00:26:58 +01:00
client Try to send typed errors back and forth 2024-01-24 20:32:39 -07:00
clock chore: Change AGPL-licensed crates to GPL (except for collab) (#4231) 2024-01-24 00:26:58 +01:00
collab Try to send typed errors back and forth 2024-01-24 20:32:39 -07:00
collab_ui Allow prompts to have detail, and use for good 2024-01-24 23:15:37 -07:00
collections Remove license-file from Cargo.toml as it is apparently redundant (#4218) 2024-01-23 17:40:30 +01:00
color chore: Change AGPL-licensed crates to GPL (except for collab) (#4231) 2024-01-24 00:26:58 +01:00
command_palette chore: Change AGPL-licensed crates to GPL (except for collab) (#4231) 2024-01-24 00:26:58 +01:00
copilot chore: Change AGPL-licensed crates to GPL (except for collab) (#4231) 2024-01-24 00:26:58 +01:00
copilot_ui chore: Change AGPL-licensed crates to GPL (except for collab) (#4231) 2024-01-24 00:26:58 +01:00
db Replace tempdir crate with tempfile 2024-01-24 17:58:09 +00:00
diagnostics Fix rendering of diagnostic blocks (#4232) 2024-01-23 16:39:57 -07:00
editor Use the correct snapshot when calculating mouse positions 2024-01-24 19:10:53 -07:00
feature_flags chore: Change AGPL-licensed crates to GPL (except for collab) (#4231) 2024-01-24 00:26:58 +01:00
feedback collab errors (#4152) 2024-01-24 23:23:58 -07:00
file_finder Clear selected index when updating file finder's matches 2024-01-23 15:39:52 -08:00
fs chore: Change AGPL-licensed crates to GPL (except for collab) (#4231) 2024-01-24 00:26:58 +01:00
fsevent Replace tempdir crate with tempfile 2024-01-24 17:58:09 +00:00
fuzzy chore: Change AGPL-licensed crates to GPL (except for collab) (#4231) 2024-01-24 00:26:58 +01:00
git chore: Change AGPL-licensed crates to GPL (except for collab) (#4231) 2024-01-24 00:26:58 +01:00
go_to_line chore: Change AGPL-licensed crates to GPL (except for collab) (#4231) 2024-01-24 00:26:58 +01:00
gpui collab errors (#4152) 2024-01-24 23:23:58 -07:00
gpui_macros Remove license-file from Cargo.toml as it is apparently redundant (#4218) 2024-01-23 17:40:30 +01:00
install_cli chore: Change AGPL-licensed crates to GPL (except for collab) (#4231) 2024-01-24 00:26:58 +01:00
journal chore: Change AGPL-licensed crates to GPL (except for collab) (#4231) 2024-01-24 00:26:58 +01:00
language Simplify language server startup (#6449) 2024-01-24 17:36:50 -08:00
language_selector chore: Change AGPL-licensed crates to GPL (except for collab) (#4231) 2024-01-24 00:26:58 +01:00
language_tools chore: Change AGPL-licensed crates to GPL (except for collab) (#4231) 2024-01-24 00:26:58 +01:00
live_kit_client chore: Change AGPL-licensed crates to GPL (except for collab) (#4231) 2024-01-24 00:26:58 +01:00
live_kit_server Remove license-file from Cargo.toml as it is apparently redundant (#4218) 2024-01-23 17:40:30 +01:00
lsp chore: Change AGPL-licensed crates to GPL (except for collab) (#4231) 2024-01-24 00:26:58 +01:00
media Remove license-file from Cargo.toml as it is apparently redundant (#4218) 2024-01-23 17:40:30 +01:00
menu chore: Change AGPL-licensed crates to GPL (except for collab) (#4231) 2024-01-24 00:26:58 +01:00
multi_buffer chore: Change AGPL-licensed crates to GPL (except for collab) (#4231) 2024-01-24 00:26:58 +01:00
node_runtime chore: Change AGPL-licensed crates to GPL (except for collab) (#4231) 2024-01-24 00:26:58 +01:00
notifications chore: Change AGPL-licensed crates to GPL (except for collab) (#4231) 2024-01-24 00:26:58 +01:00
outline chore: Change AGPL-licensed crates to GPL (except for collab) (#4231) 2024-01-24 00:26:58 +01:00
picker Render file finder separator in a way that doesn't affect layout 2024-01-23 15:39:52 -08:00
plugin chore: Change AGPL-licensed crates to GPL (except for collab) (#4231) 2024-01-24 00:26:58 +01:00
plugin_macros chore: Change AGPL-licensed crates to GPL (except for collab) (#4231) 2024-01-24 00:26:58 +01:00
plugin_runtime chore: Change AGPL-licensed crates to GPL (except for collab) (#4231) 2024-01-24 00:26:58 +01:00
prettier chore: Change AGPL-licensed crates to GPL (except for collab) (#4231) 2024-01-24 00:26:58 +01:00
project Fix panic from unwrapping a relativize() 2024-01-24 20:56:39 -07:00
project_panel Allow prompts to have detail, and use for good 2024-01-24 23:15:37 -07:00
project_symbols chore: Change AGPL-licensed crates to GPL (except for collab) (#4231) 2024-01-24 00:26:58 +01:00
quick_action_bar chore: Change AGPL-licensed crates to GPL (except for collab) (#4231) 2024-01-24 00:26:58 +01:00
recent_projects chore: Change AGPL-licensed crates to GPL (except for collab) (#4231) 2024-01-24 00:26:58 +01:00
refineable Remove license-file from Cargo.toml as it is apparently redundant (#4218) 2024-01-23 17:40:30 +01:00
rich_text chore: Change AGPL-licensed crates to GPL (except for collab) (#4231) 2024-01-24 00:26:58 +01:00
rope chore: Change AGPL-licensed crates to GPL (except for collab) (#4231) 2024-01-24 00:26:58 +01:00
rpc Allow prompts to have detail, and use for good 2024-01-24 23:15:37 -07:00
search Allow prompts to have detail, and use for good 2024-01-24 23:15:37 -07:00
semantic_index Add missing .unwrap() 2024-01-24 18:19:03 +00:00
settings chore: Change AGPL-licensed crates to GPL (except for collab) (#4231) 2024-01-24 00:26:58 +01:00
snippet chore: Change AGPL-licensed crates to GPL (except for collab) (#4231) 2024-01-24 00:26:58 +01:00
sqlez chore: Change AGPL-licensed crates to GPL (except for collab) (#4231) 2024-01-24 00:26:58 +01:00
sqlez_macros chore: Change AGPL-licensed crates to GPL (except for collab) (#4231) 2024-01-24 00:26:58 +01:00
story chore: Change AGPL-licensed crates to GPL (except for collab) (#4231) 2024-01-24 00:26:58 +01:00
storybook Fix more tests 2024-01-23 21:49:05 -08:00
sum_tree Remove license-file from Cargo.toml as it is apparently redundant (#4218) 2024-01-23 17:40:30 +01:00
terminal chore: Change AGPL-licensed crates to GPL (except for collab) (#4231) 2024-01-24 00:26:58 +01:00
terminal_view chore: Change AGPL-licensed crates to GPL (except for collab) (#4231) 2024-01-24 00:26:58 +01:00
text chore: Change AGPL-licensed crates to GPL (except for collab) (#4231) 2024-01-24 00:26:58 +01:00
theme Fix test error 2024-01-23 21:38:16 -08:00
theme_importer chore: Change AGPL-licensed crates to GPL (except for collab) (#4231) 2024-01-24 00:26:58 +01:00
theme_selector chore: Change AGPL-licensed crates to GPL (except for collab) (#4231) 2024-01-24 00:26:58 +01:00
ui Revert "Improve completion, action and shared project popovers' layout" (#4233) 2024-01-23 15:34:48 -08:00
util Replace tempdir crate with tempfile 2024-01-24 17:58:09 +00:00
vcs_menu chore: Change AGPL-licensed crates to GPL (except for collab) (#4231) 2024-01-24 00:26:58 +01:00
vim Update all links point to community 2024-01-24 15:11:17 -05:00
welcome chore: Change AGPL-licensed crates to GPL (except for collab) (#4231) 2024-01-24 00:26:58 +01:00
workspace Allow prompts to have detail, and use for good 2024-01-24 23:15:37 -07:00
zed Allow prompts to have detail, and use for good 2024-01-24 23:15:37 -07:00
zed_actions chore: Change AGPL-licensed crates to GPL (except for collab) (#4231) 2024-01-24 00:26:58 +01:00