Error handler to transmit browser errors to server