workspace: show backend error details
This commit is contained in:
parent
fb0d5aeaa9
commit
60c772ec38
|
|
@ -1,8 +1,8 @@
|
|||
---
|
||||
title: 'Show backend operation error details'
|
||||
state: 'inprogress'
|
||||
state: 'done'
|
||||
created_at: '2026-07-13T10:45:59Z'
|
||||
updated_at: '2026-07-13T10:46:30Z'
|
||||
updated_at: '2026-07-13T10:51:20Z'
|
||||
assignee: null
|
||||
queued_by: 'yoi ticket'
|
||||
queued_at: '2026-07-13T10:46:30Z'
|
||||
|
|
|
|||
|
|
@ -39,4 +39,31 @@ Ticket を `yoi ticket` が queued にしました。
|
|||
State changed to `inprogress`.
|
||||
|
||||
|
||||
---
|
||||
|
||||
<!-- event: implementation_report author: hare at: 2026-07-13T10:51:20Z -->
|
||||
|
||||
## Implementation report
|
||||
|
||||
Changed workspace-server backend operation error reporting to preserve backend messages instead of replacing them with the fixed `backend-private details were omitted` text.
|
||||
|
||||
- `sanitize_backend_error` now returns the original message.
|
||||
- Updated the existing test to assert backend operation details are preserved.
|
||||
|
||||
Validation:
|
||||
- `cargo fmt --check`
|
||||
- `git diff --check`
|
||||
- `cargo test -q -p yoi-workspace-server`
|
||||
- `nix build .#yoi --no-link`
|
||||
|
||||
|
||||
---
|
||||
|
||||
<!-- event: state_changed author: "yoi ticket" at: 2026-07-13T10:51:20Z from: inprogress to: done reason: cli_state field: state -->
|
||||
|
||||
## State changed
|
||||
|
||||
State changed to `done`.
|
||||
|
||||
|
||||
---
|
||||
|
|
|
|||
|
|
@ -4637,8 +4637,8 @@ fn settings_diagnostic(
|
|||
}
|
||||
}
|
||||
|
||||
fn sanitize_backend_error(_message: &str) -> String {
|
||||
"operation failed; backend-private details were omitted".to_string()
|
||||
fn sanitize_backend_error(message: &str) -> String {
|
||||
message.to_string()
|
||||
}
|
||||
|
||||
fn repository_diagnostics(
|
||||
|
|
@ -5201,11 +5201,14 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
fn sanitized_errors_omit_backend_private_paths() {
|
||||
fn backend_errors_preserve_operation_details() {
|
||||
let sanitized = sanitize_backend_error(
|
||||
"failed to open /home/example/.yoi/workspace-backend.local.toml",
|
||||
);
|
||||
assert!(!sanitized.contains("/home/example"));
|
||||
assert_eq!(
|
||||
sanitized,
|
||||
"failed to open /home/example/.yoi/workspace-backend.local.toml"
|
||||
);
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user