adEventError function
The error message of a failure event: the payload itself (a String) or
its error entry.
Implementation
String adEventError(Object? args) => switch (args) {
final String error => error,
{'error': final String error} => error,
_ => 'Unknown error',
};