diff --git a/src/config/weather.cpp b/src/config/weather.cpp index 2aca3ba..ab94f47 100644 --- a/src/config/weather.cpp +++ b/src/config/weather.cpp @@ -4,16 +4,13 @@ #include // curl_easy_setopt #include // curl_easy_init, curl_easy_perform, curl_easy_cleanup #include // std::{expected (Result), unexpected (Err)} -#include // std::filesystem::{path, remove, rename} #include // std::format -#include // std::{ifstream, ofstream} #include // glz::read_beve #include // glz::write_beve #include // glz::{error_ctx, error_code} #include // glz::opts #include // glz::format_error #include // NOLINT(misc-include-cleaner) - glaze/json/read.hpp is needed for glz::read -#include // std::istreambuf_iterator #include // std::{get, holds_alternative} #include "src/util/cache.hpp" @@ -24,12 +21,10 @@ #include "config.hpp" -namespace fs = std::filesystem; - using weather::Output; namespace { - using glz::opts, glz::error_ctx, glz::error_code, glz::read, glz::read_beve, glz::write_beve, glz::format_error; + using glz::opts, glz::error_ctx, glz::error_code, glz::read, glz::format_error; using util::error::DracError, util::error::DracErrorCode; using util::types::usize, util::types::Err, util::types::Exception; using weather::Coords; @@ -86,6 +81,8 @@ fn Weather::getWeatherInfo() const -> Result { return dataVal; debug_log("Cache expired"); + } else if (data.error().code == DracErrorCode::NotFound) { + debug_at(data.error()); } else error_at(data.error());