diff --git a/src/command.rs b/src/command.rs index e2716ce..0ecf08b 100644 --- a/src/command.rs +++ b/src/command.rs @@ -22,7 +22,13 @@ impl Into for Command { impl From<&str> for Command { fn from(value: &str) -> Self { - serde_json::from_str(value).unwrap_or_default() + match serde_json::from_str(value) { + Ok(command) => command, + Err(e) => { + eprintln!("[ERROR] {e}"); + Command::default() + } + } } }