Could use something like this https://ethereum.stackexchange.com/questions/154040/wagmi-error-handling-for-writecontract-action-using-vanilla-js