I'm wondering about how to create a useful implementation of a toggle switch.
So I used the search and found a similar question with an accepted answer:
Toggle Switch with Delayed State Change
A loading animation while waiting is of course a good idea.
But my question is:
How to handle a failed request?