add an error recovery in client