Word Mistake has various meanings. In this context we can take 2 meanings. Mistake is some action or decision that: 1) Do not produce positive or desired results 2) Is against the shastra (like Vedas, Smrutis).
Word Deva means "shiny", "exalted", "heavenly being", "divine being", "anything of excellence". Deva are not the most supreme beings. However, they are considered better than humans. But they can commit mistakes (of both the types). You will find many examples in our Puranas.
It is human psychology to deny (or overlook or justify) the mistakes of someone who we worship or admire. We also attribute all the possible qualities to the Devas. One of which can be – someone who never commit mistakes. Existence of a being that has all the qualities and unlimited power is not possible. You must read a philosophical problem called Problem of Evil. To understand that please read https://en.wikipedia.org/wiki/Problem_of_evil.