add persist error state