cardano-community / koios-java-client

koios-java-client
https://www.koios.rest/
Apache License 2.0
18 stars 3 forks source link

EpochSErviceImpl.getEpochParameters() throws error - Unrecognized field "extra_entropy" #47

Closed satran004 closed 2 years ago

satran004 commented 2 years ago

What operating system are you using, and which version?

Koios client - v1.11

Steps to Reproduce

Invoke EpochServiceImpl.getEpochParameter on Testnet (Babbage era)

Expected Behavior

Should return EpochParams

Actual Behavior

Throws unrecognized field for "extra_entropy".

Ideally @JsonIgnoreProperties(ignoreUnknown = true) can be added to EpochParams class to avoid error due to any new property in future.

Caused by: rest.koios.client.backend.api.base.exception.ApiException: Unrecognized field "extra_entropy" (class rest.koios.client.backend.api.epoch.model.EpochParams), not marked as ignorable (32 known properties: "block_hash", "max_tx_size", "price_step", "max_block_ex_steps", "optimal_pool_count", "protocol_minor", "protocol_major", "min_utxo_value", "max_collateral_inputs", "max_val_size", "max_tx_ex_steps", "treasury_growth_rate", "price_mem", "min_pool_cost", "max_block_size", "nonce", "entropy", "monetary_expand_rate", "coins_per_utxo_word", "influence", "max_block_ex_mem", "epoch_no", "min_fee_a", "min_fee_b", "collateral_percent", "key_deposit", "max_bh_size", "max_tx_ex_mem", "cost_models", "max_epoch", "decentralisation", "pool_deposit"])
 at [Source: (okhttp3.ResponseBody$BomAwareReader); line: 1, column: 314] (through reference chain: java.util.ArrayList[0]->rest.koios.client.backend.api.epoch.model.EpochParams["extra_entropy"])
    at rest.koios.client.backend.api.epoch.impl.EpochServiceImpl.getEpochParameters(EpochServiceImpl.java:101)
    at com.bloxbean.cardano.client.backend.koios.KoiosEpochService.getProtocolParameters(KoiosEpochService.java:77)
edridudi commented 2 years ago

Fixed in https://github.com/cardano-community/koios-java-client/pull/50/commits/39e5129ad6778a8de8174903ae71e46df6d48fbc