err functions in client