diff --git a/src/Elastic.Clients.Elasticsearch/Core/ElasticsearchClientProductRegistration.cs b/src/Elastic.Clients.Elasticsearch/Core/ElasticsearchClientProductRegistration.cs index 6c5e75b814e..725779fd326 100644 --- a/src/Elastic.Clients.Elasticsearch/Core/ElasticsearchClientProductRegistration.cs +++ b/src/Elastic.Clients.Elasticsearch/Core/ElasticsearchClientProductRegistration.cs @@ -3,8 +3,6 @@ // See the LICENSE file in the project root for more information. using System; -using System.Diagnostics.CodeAnalysis; -using Elastic.Transport; using Elastic.Transport.Products.Elasticsearch; namespace Elastic.Clients.Elasticsearch; @@ -14,26 +12,4 @@ internal sealed class ElasticsearchClientProductRegistration : ElasticsearchProd public ElasticsearchClientProductRegistration(Type markerType) : base(markerType) { } public static ElasticsearchClientProductRegistration DefaultForElasticsearchClientsElasticsearch { get; } = new(typeof(ElasticsearchClient)); - - /// - /// Elastic.Clients.Elasticsearch handles 404 in its , we do not want the low level client throwing - /// exceptions - /// when is enabled for 404's. The client is in charge of - /// composing paths - /// so a 404 never signals a wrong URL but a missing entity. - /// - public override bool HttpStatusCodeClassifier(HttpMethod method, int statusCode) => - statusCode is >= 200 and < 300 or 404; - - /// - /// Makes the low level transport aware of Elastic.Clients.Elasticsearch's - /// so that it can peek in to its exposed error when reporting failures. - /// - public override bool TryGetServerErrorReason(TResponse response, [NotNullWhen(returnValue: true)] out string? reason) - { - if (response is not ElasticsearchResponse r) - return base.TryGetServerErrorReason(response, out reason); - reason = r.ElasticsearchServerError?.Error?.ToString(); - return !string.IsNullOrEmpty(reason); - } } diff --git a/src/Elastic.Clients.Elasticsearch/Elastic.Clients.Elasticsearch.csproj b/src/Elastic.Clients.Elasticsearch/Elastic.Clients.Elasticsearch.csproj index aeab1d403da..9cf454fe07e 100644 --- a/src/Elastic.Clients.Elasticsearch/Elastic.Clients.Elasticsearch.csproj +++ b/src/Elastic.Clients.Elasticsearch/Elastic.Clients.Elasticsearch.csproj @@ -32,7 +32,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive