A callback for the case that an error occurs while negotiating.
typedef ErrorCallback = Future<void> Function(XmppError);