amcharts / dataloader

Apache License 2.0
25 stars 25 forks source link

XHR error callback & empty data #12

Open appbak3r opened 8 years ago

appbak3r commented 8 years ago

Error callback only working if 404 status sent https://github.com/amcharts/dataloader/blob/master/dataloader.js#L477

Maybe the right way is to use 200 and 302 HTTP codes for success and others for failure?

Also if there is no data from response amcharts just throws an error. It will be good if error function will be called here.

martynasma commented 8 years ago

Both are very reasonable points. We'll definitely consider it.

Thanks!