I don't see why we need to mutate state here.  This could cause problems if the app retried the request, e.g. because of a connection error.