add method to encapsulate error policy