Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/Elasticsearch.Net/Transport/Pipeline/ResponseBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@

namespace Elasticsearch.Net
{
public class ResponseBuilder<TReturn>
public class ResponseBuilder<TReturn>
where TReturn : class

{
private const int BufferSize = 81920;
private static readonly VoidResponse Void = new VoidResponse();
Expand Down Expand Up @@ -86,7 +86,7 @@ private void SetBody(ElasticsearchResponse<TReturn> response, Stream stream)
if (this._requestData.CustomConverter != null) response.Body = this._requestData.CustomConverter(response, stream) as TReturn;
else response.Body = this._requestData.ConnectionSettings.Serializer.Deserialize<TReturn>(stream);
}
if (response.AllowAllStatusCodes)
if (response.AllowAllStatusCodes)
ReadServerError(response, new MemoryStream(bytes), bytes);
}
else if (response.HttpStatusCode != null)
Expand Down Expand Up @@ -115,10 +115,10 @@ private async Task SetBodyAsync(ElasticsearchResponse<TReturn> response, Stream
else response.Body = await this._requestData.ConnectionSettings.Serializer.DeserializeAsync<TReturn>(stream, this._cancellationToken).ConfigureAwait(false);
}
if (response.AllowAllStatusCodes)
await ReadServerErrorAsync(response, new MemoryStream(bytes), bytes);
await ReadServerErrorAsync(response, new MemoryStream(bytes), bytes).ConfigureAwait(false);
}
else if (response.HttpStatusCode != null)
await ReadServerErrorAsync(response, stream, bytes);
await ReadServerErrorAsync(response, stream, bytes).ConfigureAwait(false);
}
}

Expand Down