Introduced a polling state enum. Highlighting errors and timeouts in the template