Done! Clicking "OK" in the error view now calls error.dismiss() which sets the state back to idle, hiding the popover.
error.dismiss()