Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consecutive Null Response Error #320

Closed
NJTuley opened this issue Apr 21, 2017 · 2 comments
Closed

Consecutive Null Response Error #320

NJTuley opened this issue Apr 21, 2017 · 2 comments

Comments

@NJTuley
Copy link

NJTuley commented Apr 21, 2017

We are getting multiple consecutive null responses from the citysdk request when we do a request for data. Below is the console log file, whenever the words "ERROR HELLO" are printed, our code received a null response from the server.

Here is our code for detecting and printing the "ERROR HELLO" message:

let variablesArray = [];

	for(let i = 0; i < response.features.length; i++){
		let dataPoint = response.features[i].properties[convertedVariable];
		let colorValue;

		for(let j = 0; j < colors.length; j++)
			if(dataPoint >= intervals[j].lower && dataPoint < intervals[j].upper){
				colorValue = colors[j];
				break;
			}else
				colorValue = colors[colors.length - 1];

		variablesArray.push({value: dataPoint, color: colorValue});
	}

for(let i = 0; i < variablesArray.length; i++) {
if (isNaN(variablesArray[i].value))
{
setTimeout(cmv.run());
console.log("ERROR HELLO")
return;
}
}

and here is the log file with the "ERROR HELLO" statements (in this request, we got 10 null responses before we got a response with data values)
empty_request_citysdk_log.txt

@ghost
Copy link

ghost commented Apr 21, 2017

Looking into this now...

@loganpowell
Copy link
Member

@NJTuley

We've got a new version of CitySDK ready for open beta testing if you'd like to give it a go. It's an NPM library now, so it should work on your Node server or in the browswer (via Browserify, Webpack, etc.).

Sorry for the (very long) delay

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants