Getting Error: could not detect network (event="noNetwork", code=NETWORK_ERROR, version=providers/5.6.0)

earlier the same code was working now its throwing error

using moralis erc20 transfer function. Using the polygon mumbai network

Is Mumbai selected in your wallet? Try using another RPC URL in your wallet.

E.g. https://matic-mumbai.chainstacklabs.com or https://rpc-mumbai.matic.today