Ensure socket.onerror is a function before calling it
Upgraded client-side rollbar notifier