agentTurnEndedErrorMessage function

  1. @visibleForTesting
String? agentTurnEndedErrorMessage(
  1. Map<String, Object?> payload
)

Implementation

@visibleForTesting
String? agentTurnEndedErrorMessage(Map<String, Object?> payload) {
  if (payload['type'] != agentTurnEndedType) {
    return null;
  }
  final error = payload['error'];
  if (_agentErrorIsCancellation(error)) {
    return null;
  }
  return _agentErrorMessage(error);
}