Skip to content

Commit 3d25862

Browse files
&& and > 0 in the conditional
1 parent 0e158a8 commit 3d25862

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Microsoft.Azure.Cosmos/src/GatewayStoreClient.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,8 @@ internal static async Task<DocumentClientException> CreateDocumentClientExceptio
151151
}
152152

153153
// If service rejects the initial payload like header is to large it will return an HTML error instead of JSON.
154-
if (string.Equals(responseMessage.Content?.Headers?.ContentType?.MediaType, "application/json", StringComparison.OrdinalIgnoreCase) ||
155-
responseMessage.Content?.Headers.ContentLength != 0)
154+
if (string.Equals(responseMessage.Content?.Headers?.ContentType?.MediaType, "application/json", StringComparison.OrdinalIgnoreCase) &&
155+
responseMessage.Content?.Headers.ContentLength > 0)
156156
{
157157
try
158158
{

0 commit comments

Comments
 (0)