No action to recover back a tax shall be maintained unless commenced within three (3) months after payment of the tax, nor unless the tax is paid under a written protest. In an action founded on an error or irregularity in the assessment or apportionment of the tax, only the amount in excess of the tax for which the plaintiff was liable shall be recoverable, and no sale, contract, or levy shall be avoided solely by reason of the error or irregularity.
R.I. Gen. Laws § 44-7-20