diff --git a/src/Elastic.Transport/Responses/TransportResponse.cs b/src/Elastic.Transport/Responses/TransportResponse.cs index d7dc24b..3f27ecc 100644 --- a/src/Elastic.Transport/Responses/TransportResponse.cs +++ b/src/Elastic.Transport/Responses/TransportResponse.cs @@ -23,14 +23,16 @@ public abstract class TransportResponse : TransportResponse /// public abstract class TransportResponse { - /// - /// - /// + /// Returns details about the API call that created this response. [JsonIgnore] - public ApiCallDetails? ApiCallDetails { get; internal set; } + // TODO: ApiCallDetails is always set, but nothing enforces it + // since we use new() generic constraint we can not enforce a protected constructor. + // ReSharper disable once NotNullOrRequiredMemberIsNotInitialized + public ApiCallDetails ApiCallDetails { get; internal set; } /// public override string ToString() => ApiCallDetails?.DebugInformation - ?? $"{nameof(ApiCallDetails)} not set reverting to default ToString(): {base.ToString()}"; + // ReSharper disable once ConstantNullCoalescingCondition + ?? $"{nameof(ApiCallDetails)} not set, likely a bug, reverting to default ToString(): {base.ToString()}"; }