mirror of
https://git.proxmox.com/git/proxmox
synced 2025-04-28 22:36:20 +00:00
rest-server: worker task: include context in state error message
Currently the anyhow error context of a given error is not included in the error message, as `to_string` does use the default formatting [0]. Include the error context, formatting it as single line as the message is also shown to the users in e.g. the Proxmox Backup Severs task state in the UI. [0] https://docs.rs/anyhow/latest/anyhow/struct.Error.html#display-representations Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
This commit is contained in:
parent
25c08ad247
commit
10cf5ed7b4
@ -1003,7 +1003,7 @@ impl WorkerTask {
|
||||
|
||||
if let Err(err) = result {
|
||||
TaskState::Error {
|
||||
message: err.to_string(),
|
||||
message: format!("{err:#}"),
|
||||
endtime,
|
||||
}
|
||||
} else if warn_count > 0 {
|
||||
|
Loading…
Reference in New Issue
Block a user