onerror produces connection errors instead of normal errors