error handling improvements - Refactor MQTT subscriptions #173

This commit is contained in:
proddy
2021-11-02 13:59:36 +01:00
parent b76b6be3d1
commit 5850a82d80
8 changed files with 124 additions and 66 deletions

View File

@@ -905,7 +905,9 @@ bool EMSdevice::get_value_info(JsonObject & output, const char * cmd, const int8
}
}
emsesp::EMSESP::logger().err(F("Can't get values for entity '%s'"), cmd);
char error[100];
snprintf(error, sizeof(error), "cannot find values for entity '%s'", cmd);
json["message"] = error;
return false;
}