avoid crash when DataHandler.onData call fails.