[mercedesme] bugfix auth problem causing http 412 error (#18208)

* version update
* add catching JSONException

Signed-off-by: Bernd Weymann <bernd.weymann@gmail.com>
This commit is contained in:
Bernd Weymann 2025-02-02 14:30:33 +01:00 committed by GitHub
parent 54bebb3351
commit 8e8bb061fb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 7 deletions

View File

@ -322,12 +322,12 @@ public class Constants {
public static final String WEBSOCKET_USER_AGENT_CN = "MyStarCN/1.27.0 (com.daimler.ris.mercedesme.cn.ios; build:1758; iOS 16.3.1) Alamofire/5.4.0";
public static final String WEBSOCKET_USER_AGENT_PA = "mycar-store-ap v1.27.0, android 8.0.0, SDK 2.84.3";
public static final String RIS_APPLICATION_VERSION_NA = "3.40.0";
public static final String RIS_APPLICATION_VERSION_CN = "1.39.0";
public static final String RIS_APPLICATION_VERSION_PA = "1.40.0";
public static final String RIS_APPLICATION_VERSION = "1.42.0 (2168)";
public static final String RIS_SDK_VERSION = "2.114.0";
public static final String RIS_SDK_VERSION_CN = "2.109.2";
public static final String RIS_APPLICATION_VERSION_NA = "3.51.0";
public static final String RIS_APPLICATION_VERSION_CN = "1.51.0";
public static final String RIS_APPLICATION_VERSION_PA = "1.51.0";
public static final String RIS_APPLICATION_VERSION = "1.51.0";
public static final String RIS_SDK_VERSION = "2.132.2";
public static final String RIS_SDK_VERSION_CN = "2.132.2";
public static final String RIS_OS_VERSION = "17.4.1";
public static final String RIS_OS_NAME = "ios";
public static final String X_APPLICATIONNAME = "mycar-store-ece";

View File

@ -33,6 +33,7 @@ import org.eclipse.jetty.client.util.StringContentProvider;
import org.eclipse.jetty.http.HttpHeader;
import org.eclipse.jetty.websocket.client.ClientUpgradeRequest;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import org.openhab.binding.mercedesme.internal.Constants;
import org.openhab.binding.mercedesme.internal.config.AccountConfiguration;
@ -521,7 +522,7 @@ public class AccountHandler extends BaseBridgeHandler implements AccessTokenRefr
// store in cache
capabilitiesMap.put(vin, featureMap);
return featureMap;
} catch (InterruptedException | TimeoutException | ExecutionException e) {
} catch (InterruptedException | TimeoutException | ExecutionException | JSONException e) {
logger.trace("Error retrieving capabilities: {}", e.getMessage());
featureMap.clear();
}