Any justice of the supreme court, judge of the court of appeals, or judge of the superior court in the proper county shall, by order, require any person charged with error, wrongful act, or neglect to forthwith correct the error, desist from the wrongful act, or perform the duty and to do as the court orders or to show cause forthwith why the error should not be corrected, the wrongful act desisted from, or the duty or order not performed, whenever it is made to appear to such justice or judge by affidavit of an elector that:
(1) A wrongful act other than as provided for in RCW
29A.68.011 has been performed or is about to be performed by any election officer; or
(2) Any neglect of duty on the part of an election officer other than as provided for in RCW
29A.68.011 has occurred or is about to occur; or
(3) An error or omission has occurred or is about to occur in the official certification of any primary or election, including a challenge to the certification of any measure.
An affidavit of an elector under this subsection shall be filed with the appropriate court no later than ten days following the official certification of the primary or election as provided in RCW
29A.60.190,
29A.60.240, or
29A.60.250 or, in the case of a recount, ten days after the official certification of the amended abstract as provided in RCW
29A.64.061.