Implementing switch to allow init to use mock data, for both successful and error responses