removed redundant return statements

added clientError exception