Write errors in states and display them in UI
Write errors in states and display them in UI