Project: titanium
Issue TIMOB-19042: Windows: HTTPClient GET on an incorrect URL throws onload instead of onerror
h5.Description When doing a HTTP GET on an incorrect URL the HTTPClient will throw onLoad rather than onError. {code} var win = Ti.UI.createWindow({backgroundColor: 'white'}); var lbl = Ti.UI.createLabel({ text: 'Tap me!', color: 'black' }) var url = 'http://httpbin.org/gert'; lbl.addEventListener('click', function(){ var client = Ti.Network.createHTTPClient({ onload : function(e) { alert('onload'); }, onerror : function(e) { alert('onerror'); } }); client.open('GET', url); client.send(); }); win.add(lbl); win.open(); {code} h5.Steps To Reproduce 1. Add the above code to an app.js 2. Build to a device or emulator 3. Tap the label h5.Actual Result An alert will be shown with onload h5.Expected Result An alert should be shown with onerror
Story points: 5