How could I detect this error  when the metamask modal shows up and user clicks reject? I'm using ether.js and web3Modal. 

[![enter image description here][1]][1]


  [1]: https://i.sstatic.net/7VlxH.png