making error message driven by client