getFunctionsByNameLogs method

Future<LogLines?> getFunctionsByNameLogs(
  1. String name
)

Is the output of a function's most recent run — its error text when that run failed, else what it printed.

Is the output of a function's most recent run — its error text when that run failed, else what it printed. It is the LAST run only, and it is empty when the function has never run. There is no log retention behind this beyond the recorded invocation itself.

Parameters:

  • String name (required): Name is the function the URL names.

Implementation

Future<LogLines?> getFunctionsByNameLogs(String name,) async {
  final response = await getFunctionsByNameLogsWithHttpInfo(name,);
  if (response.statusCode >= HttpStatus.badRequest) {
    throw ApiException(response.statusCode, await _decodeBodyBytes(response));
  }
  // When a remote server returns no body with a status of 204, we shall not decode it.
  // At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
  // FormatException when trying to decode an empty string.
  if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
    return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'LogLines',) as LogLines;

  }
  return null;
}