error management in client