Setup response handling boilerplate