[06:47:21 ERR] An unhandled exception was thrown by the application.
Amazon.Runtime.AmazonUnmarshallingException: Error unmarshalling response back from AWS. Request ID: RLPJN61T7M4EBEC16MQAQBV127VV4KQNSO5AEMVJF66Q9ASUAAJG, Last Parsed Path: /Item/Body/S ---> ThirdParty.Json.LitJson.JsonException: Incomplete JSON Document
at ThirdParty.Json.LitJson.JsonReader.Read()
at Amazon.Runtime.Internal.Transform.JsonUnmarshallerContext.Read()
at Amazon.Runtime.Internal.Transform.SimpleTypeUnmarshaller`1.Unmarshall(JsonUnmarshallerContext context)
at Amazon.DynamoDBv2.Model.Internal.MarshallTransformations.AttributeValueUnmarshaller.Unmarshall(JsonUnmarshallerContext context)
at Amazon.Runtime.Internal.Transform.KeyValueUnmarshaller`4.Unmarshall(JsonUnmarshallerContext context)
at Amazon.Runtime.Internal.Transform.DictionaryUnmarshaller`4.Unmarshall(JsonUnmarshallerContext context)
at Amazon.DynamoDBv2.Model.Internal.MarshallTransformations.GetItemResponseUnmarshaller.Unmarshall(JsonUnmarshallerContext context)
at Amazon.Runtime.Internal.Transform.JsonResponseUnmarshaller.Unmarshall(UnmarshallerContext input)
--- End of inner exception stack trace ---
at Amazon.Runtime.Internal.Transform.JsonResponseUnmarshaller.Unmarshall(UnmarshallerContext input)
at Amazon.Runtime.Internal.Transform.ResponseUnmarshaller.UnmarshallResponse(UnmarshallerContext context)
at Amazon.Runtime.Internal.Unmarshaller.UnmarshallResponse(UnmarshallerContext context, IRequestContext requestContext)
at Amazon.Runtime.Internal.Unmarshaller.Unmarshall(IExecutionContext executionContext)
at Amazon.Runtime.Internal.ErrorHandler.InvokeSync(IExecutionContext executionContext)
at Amazon.Runtime.Internal.CallbackHandler.InvokeSync(IExecutionContext executionContext)
at Amazon.Runtime.Internal.RetryHandler.InvokeSync(IExecutionContext executionContext)
at Amazon.Runtime.Internal.CallbackHandler.InvokeSync(IExecutionContext executionContext)
at Amazon.Runtime.Internal.CallbackHandler.InvokeSync(IExecutionContext executionContext)
at Amazon.Runtime.Internal.ErrorCallbackHandler.InvokeSync(IExecutionContext executionContext)
at Amazon.Runtime.Internal.MetricsHandler.InvokeSync(IExecutionContext executionContext)
at Amazon.Runtime.Internal.RuntimePipeline.InvokeSync(IExecutionContext executionContext)
at Amazon.Runtime.AmazonServiceClient.Invoke[TRequest,TResponse](TRequest request, IMarshaller`2 marshaller, ResponseUnmarshaller unmarshaller)
at Amazon.DynamoDBv2.DocumentModel.Table.GetItemHelper(Key key, GetItemOperationConfig config, Boolean isAsync)
at Amazon.DynamoDBv2.DataModel.DynamoDBContext.LoadHelper[T](Key key, DynamoDBFlatConfig flatConfig, ItemStorageConfig storageConfig, Boolean isAsync)
at System.Threading.Tasks.Task`1.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at Notifications.Messaging.Recommendations.DynamoReader`1.<GetAsync>d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at Notifications.Messaging.Recommendations.RecommendationService.<GetRecommendedJob>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
I’m putting in the temporary work around of checking for the existince of Content-Endcoding. I’m just doing a bit more testing first.
Looks like this is a reported issue with the HttpClient about exposing headers that are incorrect when working with a gzip response.
https://github.com/dotnet/corefx/issues/6796
I think what I can do till a fix is pushed in the HTTP client is look for the existence of the Content-Encoding header and if skip the CRC check if it is present.