From 9aaf9f41adcafa8a47ecd48b8444167b9fb2d525 Mon Sep 17 00:00:00 2001 From: Alex Janka Date: Sat, 13 Jan 2024 15:14:50 +1100 Subject: [PATCH] more verbose error --- Cargo.lock | 2 +- Cargo.toml | 2 +- src/api_interface.rs | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d41ca46..938c8af 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2256,7 +2256,7 @@ dependencies = [ [[package]] name = "tesla-charge-controller" -version = "0.1.21" +version = "0.1.22" dependencies = [ "async-channel", "chrono", diff --git a/Cargo.toml b/Cargo.toml index c548e30..bed06c6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tesla-charge-controller" -version = "0.1.21" +version = "0.1.22" edition = "2021" license = "MITNFA" description = "Controls Tesla charge rate based on solar charge data" diff --git a/src/api_interface.rs b/src/api_interface.rs index ea09aa5..e624f3f 100644 --- a/src/api_interface.rs +++ b/src/api_interface.rs @@ -191,11 +191,11 @@ impl TeslaInterface { RequestError::StdIo(e) => log::error!("Stdio error: {e:?}"), RequestError::RonSpanned(e) => log::error!("RON parsing error: {e:?}"), RequestError::Teslatte(teslatte::error::TeslatteError::DecodeJsonError { - source: _, + source, request: _, body, }) => { - log::error!("Error getting state: {body}") + log::error!("Error {source} getting state: {body}") } RequestError::Teslatte(e) => log::error!("Teslatte error: {e:?}"), RequestError::Save(e) => log::error!("Save error: {e:?}"),