onHttpError method
Method used to handle Http errors. Conveniently placed in this class to facilitate overrides.
Implementation
Future<RetryAction> onHttpError(
HttpResponse response, NodeSpec action, ActionContext context) async {
if (response.statusCode == 401) {
showErrorMessage("invalid_session_message");
} else {
showErrorMessage("communication_error_message");
}
return RetryAction(false);
}