Skip to content

Cannot deserialize value of type com.dji.sdk.cloudapi.media.StorageConfigGetModuleEnum from String "2": not one of the values accepted for Enum class #100

@prabaljainn

Description

@prabaljainn

I have a DOCK 2 and M3TD, I configured DJI Cloud APIs and we have this

public enum StorageConfigGetModuleEnum {

    MEDIA(0);

    private final int module;

    StorageConfigGetModuleEnum(int module) {
        this.module = module;
    }

    @JsonValue
    public int getModule() {
        return module;
    }

    @JsonCreator
    public StorageConfigGetModuleEnum find(int module) {
        return Arrays.stream(values()).filter(moduleEnum -> moduleEnum.module == module).findAny()
                .orElseThrow(() -> new CloudSDKException(StorageConfigGetModuleEnum.class, module));
    }
}

but I see Aircraft and DOCK sending MQTT msg:

{
  "bid": "8470bd84-7830-454e-9118-2dbcf1a73221",
  "data": {
    "country_code": "IN",
    "device_sn": "XXXX",
    "flight_id": "XXX",
    "module": 2,
    "sns_to_encrypted": [
      "X",
      "Y",
      "Z",
      "ZZ"
    ]
  },
  "method": "storage_config_get",
  "tid": "as-a7b1-as-9645-062bdc8fd846",
  "timestamp": 1752812935874,
  "gateway": "7CTXM8M00B00N9"
}

module 2?? why module 2, there is no module 2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions