update error state