Возвращает сообщение HttpException или null.
HttpException
null
String? httpMessage(Object? error) => error is HttpException ? error.message : null;