Use the eth-revert-reason NPM package to easily derive the reason for an Ethereum transaction failure — Failed Ethereum transactions sometimes include a reason for the transaction reversion. Retrieving these reasons is harder than it should be, especially given how useful these messages are. Inconsistencies between Geth and Parity, Infura and Alchemy, and even ethers.js and web3.js add to this complexity.