client error checking