[SOLVED] API suddenly stopped handling chain param as hex value

The code which working for the last half year suddenly causes error today.

API Request: https://xxxxx.usemoralis.com:2053/server/functions/getNFTsForContract
With payload:

address: "xxxx"
chain: "0x38"
token_address: "0xd6f8a35F202E2575aCDf929F0069c2E8b3e65ada"

Returns error 400 with chain must be a valid enum value.

But other values for chain, like bsc work (from documentation: https://docs.moralis.io/moralis-dapp/web3-api/supported-chains)

It should be fixed soon, thanks for reporting

it should be fixed now

Not working for my dapp either on the same API request after working fine for a month.
The chain “mainnet” returns the same error of chain must be a valid enum value

When switching to the hex chain of “0x1” it proceeded to work fine.

what it the chain value that doesn’t work for you now?

Same issue here. API suddenly stopped working with “mainnet” as the chain. Switching to “0x1” works, but why does “mainnet” not work anymore? The docs say it is a valid value.

“mainnet” does not work anymore.

1 Like
chain: "mainnet",
address: ethAddress,
token_address: contractAddress,

This gives an error of chain must be a valid enum value
But switching chain to “0x1” works fine

ok, got it, mainnet is the case that doesn’t work now

1 Like

@hunter, @Milly, it should be fixed now

2 Likes

thanks @cryptokid - what was the cause of the problem?

It was related to an update that was done today.

I confirm, it’s fixed.
Thank you for fast reaction.