'Web3js Javascript Returned error: execution reverted

I have my own BSC node running for scraping data, sometimes there is a token that does not have the standard token info functions like name, symbol, totalSupply and decimals and my scraper will throw a error "Returned error: execution reverted". now I can't find a way to prevent from stopping the scraper if I get this error. I just want the scraper to ignore that token if it gets the error.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source