Sudden error, Chain must be a valid enum value

i’m using Moralis SDK v2.8 and calling Moralis.EvmApi.token method with the Fuji hex as argument, it was working for a long time now suddenly stopped working and throwing this error.

Error: [C0006] Request failed, Bad Request(400): chain must be a valid enum value

I’ve saw that this error used to pop out in the past and the cause was an update with the Moralis API

Hi @cbadour

Can you try upgrading to the latest sdk? The current latest version is 2.21.0.
Let us know if you still have any issue.

@johnversus I did, and i still have it.
btw when i changed the hex code from Fuji’s hex code to Avalanche main-net hex code the API returns a success response

We have depriciated Cronos Testnet and Avalanche Testnet. That should be the reason for the error. You can use other testnet like Gorerli, sepolia or mumbai for testing.

@johnversus Why did you removed Support for these chains, does it hold any issues or something ?

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.