diff --git a/App/Containers/HomeScreen.js b/App/Containers/HomeScreen.js
index 2d7c905ea..dc92f1937 100644
--- a/App/Containers/HomeScreen.js
+++ b/App/Containers/HomeScreen.js
@@ -1,5 +1,5 @@
import React from 'react'
-import { Platform, StyleSheet, Text, View } from 'react-native'
+import { Platform, StyleSheet, Text, View, Button } from 'react-native'
import { connect } from 'react-redux'
import { PropTypes } from 'prop-types'
import ExampleActions from 'App/Stores/Example/Actions'
@@ -24,6 +24,7 @@ class HomeScreen extends React.Component {
The weather temperature is: {this.props.temperature}
{this.props.errorMessage}
+
)
}
diff --git a/App/Service/WeatherService.js b/App/Service/WeatherService.js
index 0ed42a8ed..04581e7d8 100644
--- a/App/Service/WeatherService.js
+++ b/App/Service/WeatherService.js
@@ -10,6 +10,13 @@ const weatherApiClient = create({
})
function fetchTemperature() {
+ // Simulate an error 50% of the time just for testing purposes
+ if (Math.random() > 0.5) {
+ return new Promise(function(resolve, reject) {
+ resolve(null);
+ });
+ }
+
const locationQuery = escape(
"select item.condition.temp from weather.forecast where woeid in (select woeid from geo.places where text='Lyon, Rhone-Alpes, FR') and u='c'"
)