I am using custom error like these:
error BadIndexError();
revert BadIndexError();
Now, if I want to retrieve these errors how would I retrieve it in frontend?
Plus, I am using custom framework for tests for my company. How would I retrieve such errors in my tests as well? Right now I just get revert and no error message.
Any simple way? Does ethersjs support it?