getProjectsEdge method
health reports whether a publish reaches readers, rather than whether it was accepted.
health reports whether a publish reaches readers, rather than whether it was accepted. Those are different questions and only the second one was ever visible. It asks the edge and nothing else. There is no live call to the provider here: Configured is a local fact, it is the fact that was missing, and a health check that spends a third-party API call is one an operator learns not to run.
Implementation
Future<EdgeState?> getProjectsEdge() async {
final response = await getProjectsEdgeWithHttpInfo();
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), 'EdgeState',) as EdgeState;
}
return null;
}