diff --git a/api/json.php b/api/json.php index 1befe5d..796b025 100755 --- a/api/json.php +++ b/api/json.php @@ -37,6 +37,12 @@ if (isset($_GET['locId'])) { $sensorData = json_decode($_POST['submitSensorData'], true); $ret = $blueweather->processSensorData($sensorData); $data = $ret; + if ($ret['status'] !== 200) { + $log = "\n[".date("M,d,Y h:i:s A")."] ret: ".json_encode($ret)." request: ".json_encode($_POST['submitSensorData']); + //echo $log; + file_put_contents("./error.log" ,$log, FILE_APPEND); + } + } elseif (isset($_GET['command'])) { // some user-data api request $request = json_decode($_GET['command'], true);