Error handler that can match on more than just type