Modify error messages

This commit is contained in:
Terrence
2025-02-24 15:47:44 +08:00
parent 6b855eae53
commit de783b7c57
4 changed files with 14 additions and 18 deletions

View File

@@ -99,7 +99,7 @@ bool WebsocketProtocol::OpenAudioChannel() {
if (!websocket_->Connect(url.c_str())) {
ESP_LOGE(TAG, "Failed to connect to websocket server");
if (on_network_error_ != nullptr) {
on_network_error_(Lang::Strings::UNABLE_TO_CONNECT_TO_SERVICE);
on_network_error_(Lang::Strings::SERVER_NOT_FOUND);
}
return false;
}
@@ -120,7 +120,7 @@ bool WebsocketProtocol::OpenAudioChannel() {
if (!(bits & WEBSOCKET_PROTOCOL_SERVER_HELLO_EVENT)) {
ESP_LOGE(TAG, "Failed to receive server hello");
if (on_network_error_ != nullptr) {
on_network_error_(Lang::Strings::WAITING_FOR_RESPONSE_TIMEOUT);
on_network_error_(Lang::Strings::SERVER_TIMEOUT);
}
return false;
}