error decorator