Skip to content

Commit

Permalink
[mercedesme] bugfix auth problem causing http 412 error (#18208)
Browse files Browse the repository at this point in the history
* version update
* add catching JSONException

Signed-off-by: Bernd Weymann <[email protected]>
  • Loading branch information
weymann authored Feb 2, 2025
1 parent 54bebb3 commit 8e8bb06
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
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;
Expand Down Expand Up @@ -521,7 +522,7 @@ private Map<String, Object> getCapabilities(String vin) {
// 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();
}
Expand Down

0 comments on commit 8e8bb06

Please sign in to comment.