Add ability to customize the errorClass