Error code 141 in getAllERC20 method

Hi, first, thanks for all your contribution in the crypto space.

I want to report an issue with the getAllERC20 method. Yesterday was working fine, but today is giving the next error:

responseText: '{"code":141,"error":"[object Object]"}'

UnhandledPromiseRejectionWarning: Error: [object Object]
   at handleError (/opt/saitama-inu-api/node_modules/moralis/lib/node/RESTController.js:431:17)
   at processTicksAndRejections (internal/process/task_queues.js:95:5)
   at async Function.getAllERC20 (/opt/saitama-inu-api/node_modules/moralis/lib/node/MoralisWeb3.js:271:20)

Here is my code:

Moralis.Web3.getAllERC20({ address: "0x513e98FF7d4E342Fa34042b0F97746A9e625986c" })

I read some topics here in the forum and it seems that the error can be in the Moralis server. If not, please say me what I am doing wrong. In advance, thanks you so much, I really appreciate any help

It doesn’t look like it is working, anyway this function will be removed in the future and you should use

Moralis.Web3API.account.getNativeBalance({ address: "0x513e98FF7d4E342Fa34042b0F97746A9e625986c", chain:"ropsten" })


Moralis.Web3API.account.getTokenBalances({ address: "0x513e98FF7d4E342Fa34042b0F97746A9e625986c", chain:"eth" })

Hi, thanks a lot for your quick response, so what you mean is that the best to do is to remove this method and use one of the options that you sent to me?. If so, which one of them is more similar to the method getAllERC20? In advance, thanks

Moralis.Web3API.account.getNativeBalance will return only native balance for native currency like ETH, BNB, and Moralis.Web3API.account.getTokenBalances will return only balances for ERC20 tokens. There are times when you’ll have to use both of them depending on what information you need.

Thanks a lot for your clarification :slight_smile: