Handling error responses, separating client-side business logic from view changes