Hi all,
We're using v1.5.2 and getting the error "One of the specified inputs is invalid".
It occurs when calling CreateDocumentCollectionAsync and CreateDocumentQuery, and JsonSerializerSettings sets TypeNameHandling = TypeNameHandling.All.
An example of calling CreateDocumentQuery:
var sqlQuerySpec = new SqlQuerySpec();
sqlQuerySpec.QueryText = "SELECT * FROM c where c.UserName = @userName";
sqlQuerySpec.Parameters = new SqlParameterCollection();
sqlQuerySpec.Parameters.Add(new SqlParameter() { Name = "@userName", Value = "John Doe" });
var queryResult = _documentClient.CreateDocumentQuery(_collection.SelfLink, sqlQuerySpec).AsEnumerable();
Using sql expression with no parameters, it works ok.
Using lambda expression, it works ok.
Setting TypeNameHandling to default value, works ok too.
Warm greetings!
Could you supply code that shows how are you setting TypeNameHandling?
Hi @ryancrawcour ,
Here is the code. Is set through the Newtonsoft json default settings:
using Newtonsoft.Json;
...
private static void SerializationConfiguration()
{
JsonConvert.DefaultSettings =
() =>
{
return new JsonSerializerSettings()
{
TypeNameHandling = TypeNameHandling.All
};
};
}
We are getting this issue after upgrade documentDB SDK from 1.4.0 to 1.5.3 in order to avoid another error. The issue is intermitent. And sometimes is fired and sometimes works very well. This is the stacktrace.
System.AggregateException: One or more errors occurred. ---> Microsoft.Azure.Documents.DocumentClientException: Message: {"Errors":["One of the specified inputs is invalid"]}
ActivityId: d6e4be72-4e56-4bf0-a3bd-add18aea03d8, Request URI: /apps/1921ec42-1c88-4fdd-8d6c-78646cba4b15/services/5a6ecf0c-e108-43c3-a02e-c603da0cada5/partitions/bd90d3ec-3997-4813-b0a6-e137e7720c46/replicas/131024487654806256s
at Microsoft.Azure.Documents.Client.ClientExtensions.<ParseResponseAsync>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 Microsoft.Azure.Documents.GatewayStoreModel.<>c__DisplayClassf.<<InvokeAsync>b__e>d__11.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 Microsoft.Azure.Documents.BackoffRetryUtility1.<>c__DisplayClass2.<
--- 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 Microsoft.Azure.Documents.BackoffRetryUtility1.<ExecuteRetry>d__16.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 Microsoft.Azure.Documents.BackoffRetryUtility1.
--- 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 Microsoft.Azure.Documents.GatewayStoreModel.
--- 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 Microsoft.Azure.Documents.GatewayStoreModel.
--- 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 Microsoft.Azure.Documents.Client.DocumentClient.
--- 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.ValidateEnd(Task task)
at Microsoft.Azure.Documents.Linq.DocumentQueryExecutionContext.
--- 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 Microsoft.Azure.Documents.BackoffRetryUtility1.<>c__DisplayClass2.<<ExecuteAsync>b__1>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 Microsoft.Azure.Documents.BackoffRetryUtility1.
--- 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 Microsoft.Azure.Documents.BackoffRetryUtility1.<ExecuteAsync>d__7.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 Microsoft.Azure.Documents.Linq.DocumentQueryExecutionContext.<ExecuteAllAsync>d__7.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 Microsoft.Azure.Documents.Linq.DocumentQuery1.
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task1.GetResultCore(Boolean waitCompletionNotification)
at System.Threading.Tasks.Task1.get_Result()
at Microsoft.Azure.Documents.Linq.DocumentQuery1.GetEnumerator()
at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable1 source)
at Leadbox.DataAccess.CustomerRepository.ReadByLeadId(Guid id) in \machomeDevelopLeadboxsrcLeadboxDataAccessDataAccessCustomerRepository.cs:line 177
at Leadbox.Web.Controllers.LeadsController.ChangeStatus(Guid leadId, LeadStatus status, String[] interests) in \machomeDevelopLeadboxsrcLeadboxWebLeadbox.WebControllersLeadsController.cs:line 1744
at lambda_method(Closure , ControllerBase , Object[] )
at System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters)
at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary2 parameters)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary2 parameters)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult2.CallEndDelegate(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase1.End()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.
at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass46.
at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass46.
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass33.
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult1.CallEndDelegate(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase1.End()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass21.<>c__DisplayClass2b.
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass21.
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult1.CallEndDelegate(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase1.End()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult)
at System.Web.Mvc.Controller.
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid1.CallEndDelegate(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase1.End()
at System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult)
at System.Web.Mvc.Controller.
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid1.CallEndDelegate(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase1.End()
at System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult)
at System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.EndExecute(IAsyncResult asyncResult)
at System.Web.Mvc.MvcHandler.
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid1.CallEndDelegate(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase1.End()
at System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult)
at System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
---> (Inner Exception #0) Microsoft.Azure.Documents.DocumentClientException: Message: {"Errors":["One of the specified inputs is invalid"]}
ActivityId: d6e4be72-4e56-4bf0-a3bd-add18aea03d8, Request URI: /apps/1921ec42-1c88-4fdd-8d6c-78646cba4b15/services/5a6ecf0c-e108-43c3-a02e-c603da0cada5/partitions/bd90d3ec-3997-4813-b0a6-e137e7720c46/replicas/131024487654806256s
at Microsoft.Azure.Documents.Client.ClientExtensions.
--- 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 Microsoft.Azure.Documents.GatewayStoreModel.<>c__DisplayClassf.<
--- 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 Microsoft.Azure.Documents.BackoffRetryUtility1.<>c__DisplayClass2.<<ExecuteAsync>b__1>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 Microsoft.Azure.Documents.BackoffRetryUtility1.
--- 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 Microsoft.Azure.Documents.BackoffRetryUtility1.<ExecuteAsync>d__7.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 Microsoft.Azure.Documents.GatewayStoreModel.<InvokeAsync>d__1d.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 Microsoft.Azure.Documents.GatewayStoreModel.<ProcessMessageAsync>d__2.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 Microsoft.Azure.Documents.Client.DocumentClient.<ExecuteQueryAsync>d__2cb.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.ValidateEnd(Task task)
at Microsoft.Azure.Documents.Linq.DocumentQueryExecutionContext.<ExecuteOnceAsync>d__c.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 Microsoft.Azure.Documents.BackoffRetryUtility1.<>c__DisplayClass2.<
--- 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 Microsoft.Azure.Documents.BackoffRetryUtility1.<ExecuteRetry>d__16.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 Microsoft.Azure.Documents.BackoffRetryUtility1.
--- 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 Microsoft.Azure.Documents.Linq.DocumentQueryExecutionContext.
--- 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 Microsoft.Azure.Documents.Linq.DocumentQuery1.<GetEnumeratorTAsync>d__10.MoveNext()<---
What operation is this reported on? This is most likely happening because this JSON.NET setting inserts additional fields in to the payload of server objects like a DocumentCollection and its IndexPolicy. The server then rejects this because it doesn't recognize these "inputs".
We don't yet support TypeNameHandling.All
You can do this by manually adding a Type property on your POCO objects (inherit from a Base class that sets this automatically in code).
I guess the error message should be more explicit. instead of just telling One of the specified inputs is invalid it should be explicit which input value exactly is invalid.
Also, I get the same error when setting TypeNameHandling.All, TypeNameHandling.Auto and TypeNameHandling.None when replacing an document. So there might be a different reason for this issue.
The partition key is supposed to have a String value. I tried inserting the payload directly into cosmos via upload and got this message. I converted it to string and worked well for me.
The partition key is supposed to have a String value. I tried inserting the payload directly into cosmos via upload and got this message. I converted it to string and worked well for me.
This tip was useful. I was passing my ID and PartitionKey as ints Once I changed these to string, everything worked fine.
The partition key is supposed to have a String value. I tried inserting the payload directly into cosmos via upload and got this message. I converted it to string and worked well for me.
This worked for me too. Would definitely be ideal if Cosmos DB actually prompted with this action item when an incorrect partition key is specified.
What operation is this reported on? This is most likely happening because this JSON.NET setting inserts additional fields in to the payload of server objects like a DocumentCollection and its IndexPolicy. The server then rejects this because it doesn't recognize these "inputs".
We don't yet support TypeNameHandling.All
You can do this by manually adding a Type property on your POCO objects (inherit from a Base class that sets this automatically in code).
I have this exception:
Please help with the information you think will help
Microsoft.Azure.Documents.DocumentClientException: Message: {"Errors":["One of the specified inputs is invalid"]}
ActivityId: ce4ebe53-16a1-4fe4-aeec-6214a2c976cf, Request URI: /apps/9016141d-5e96-4e71-ba44-84e9023167d4/services/3211c5e9-5135-41aa-a69b-a64b43304a5a/partitions/60c64a74-4db0-47be-9e3f-e63537adbd04/replicas/132440476774272498p/, RequestStats:
RequestStartTime: 2020-09-20T16:08:30.9843854Z, RequestEndTime: 2020-09-20T16:08:30.9843854Z, Number of regions attempted:1
ResponseTime: 2020-09-20T16:08:30.9843854Z, StoreResult: StorePhysicalAddress: rntbd://cdb-ms-prod-westeurope1-fd42.documents.azure.com:14305/apps/9016141d-5e96-4e71-ba44-84e9023167d4/services/3211c5e9-5135-41aa-a69b-a64b43304a5a/partitions/60c64a74-4db0-47be-9e3f-e63537adbd04/replicas/132440476774272498p/, LSN: 159106, GlobalCommittedLsn: 159106, PartitionKeyRangeId: 2, IsValid: True, StatusCode: 400, SubStatusCode: 0, RequestCharge: 0, ItemLSN: -1, SessionToken: -1#159106, UsingLocalLSN: False, TransportException: null, ResourceType: Document, OperationType: Upsert
, SDK: Microsoft.Azure.Documents.Common/2.11.0, Windows/10.0.14393 documentdb-netcore-sdk/2.4.0
at Microsoft.Azure.Documents.GatewayStoreClient.ParseResponseAsync(HttpResponseMessage responseMessage, JsonSerializerSettings serializerSettings, DocumentServiceRequest request)
at Microsoft.Azure.Documents.GatewayStoreClient.InvokeAsync(DocumentServiceRequest request, ResourceType resourceType, Uri physicalAddress, CancellationToken cancellationToken)
at Microsoft.Azure.Documents.GatewayStoreModel.ProcessMessageAsync(DocumentServiceRequest request, CancellationToken cancellationToken)
at Microsoft.Azure.Documents.Client.DocumentClient.ProcessRequestAsync(DocumentServiceRequest request, IDocumentClientRetryPolicy retryPolicyInstance, CancellationToken cancellationToken)
at Microsoft.Azure.Documents.Client.DocumentClient.UpsertDocumentPrivateAsync(String documentCollectionLink, Object document, RequestOptions options, Boolean disableAutomaticIdGeneration, IDocumentClientRetryPolicy retryPolicyInstance, CancellationToken cancellationToken)
at Microsoft.Azure.Documents.BackoffRetryUtility1.ExecuteRetryAsync(Func1 callbackMethod, Func3 callShouldRetry, Func1 inBackoffAlternateCallbackMethod, TimeSpan minBackoffForInBackoffCallback, CancellationToken cancellationToken, Action1 preRetryCallback)
at Microsoft.Azure.Documents.ShouldRetryResult.ThrowIfDoneTrying(ExceptionDispatchInfo capturedException)
at Microsoft.Azure.Documents.BackoffRetryUtility1.ExecuteRetryAsync(Func1 callbackMethod, Func3 callShouldRetry, Func1 inBackoffAlternateCallbackMethod, TimeSpan minBackoffForInBackoffCallback, CancellationToken cancellationToken, Action1 preRetryCallback)
at Microsoft.Azure.Documents.Client.DocumentClient.UpsertDocumentInlineAsync(String documentsFeedOrDatabaseLink, Object document, RequestOptions options, Boolean disableAutomaticIdGeneration, CancellationToken cancellationToken)
at Atura.Core.Functions.ServiceBusTopicTriggerFunction.ServiceBusTopicTriggerFunction.UpsertDocumentAsync(Object document, RequestOptions requestOptions, Boolean disableAutomaticIdGeneration) in D:a1sCoreAtura.FunctionsServiceBusTopicTriggerFunctionServiceBusTopicTriggerFunction.cs:line 176
at Atura.Core.Functions.ServiceBusTopicTriggerFunction.ServiceBusTopicTriggerFunction.Run(String mySbMsg, ILogger log, ExecutionContext context) in D:a1sCoreAtura.FunctionsServiceBusTopicTriggerFunctionServiceBusTopicTriggerFunction.cs:line 59
at Microsoft.Azure.WebJobs.Host.Executors.VoidTaskMethodInvoker2.InvokeAsync(TReflected instance, Object[] arguments) in C:\projects\azure-webjobs-sdk-rqm4t\src\Microsoft.Azure.WebJobs.Host\Executors\VoidTaskMethodInvoker.cs:line 20
at Microsoft.Azure.WebJobs.Host.Executors.FunctionInvoker2.InvokeAsync(Object instance, Object[] arguments) in C:projectsazure-webjobs-sdk-rqm4tsrcMicrosoft.Azure.WebJobs.HostExecutorsFunctionInvoker.cs:line 52
at Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.InvokeAsync(IFunctionInvoker invoker, ParameterHelper parameterHelper, CancellationTokenSource timeoutTokenSource, CancellationTokenSource functionCancellationTokenSource, Boolean throwOnTimeout, TimeSpan timerInterval, IFunctionInstance instance) in C:projectsazure-webjobs-sdk-rqm4tsrcMicrosoft.Azure.WebJobs.HostExecutorsFunctionExecutor.cs:line 589
at Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.ExecuteWithWatchersAsync(IFunctionInstanceEx instance, ParameterHelper parameterHelper, ILogger logger, CancellationTokenSource functionCancellationTokenSource) in C:projectsazure-webjobs-sdk-rqm4tsrcMicrosoft.Azure.WebJobs.HostExecutorsFunctionExecutor.cs:line 537
at Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.ExecuteWithLoggingAsync(IFunctionInstanceEx instance, ParameterHelper parameterHelper, IFunctionOutputDefinition outputDefinition, ILogger logger, CancellationTokenSource functionCancellationTokenSource) in C:projectsazure-webjobs-sdk-rqm4tsrcMicrosoft.Azure.WebJobs.HostExecutorsFunctionExecutor.cs:line 481
at Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.ExecuteWithLoggingAsync(IFunctionInstanceEx instance, FunctionStartedMessage message, FunctionInstanceLogEntry instanceLogEntry, ParameterHelper parameterHelper, ILogger logger, CancellationToken cancellationToken) in C:projectsazure-webjobs-sdk-rqm4tsrcMicrosoft.Azure.WebJobs.HostExecutorsFunctionExecutor.cs:line 290
on copying data to cosmos db from power automate , I get the same error as ""One of the specified input is invalid." the body value i am getting which i am trying to copy is like this: and partition key i used is "REC". unable to figure out which data is invalid
[{"Id":"ABC|CZ-J_1S4810L1_20201Z","DocType":"REC","Project":"VARYJAM_GUIK","ProjectId":"VARYJAM_GUIK_09990ISDF_20227Z","Tags":[],"Properties":{"WindowsUUID":"900E0AEC-35EA-11B2-A85C-EC54BBEEEE","X4SampleID":"9375953074","uDriverVersion":"v1_2_3"},"Categories":[],"Trigger":true,"Received":"2020-10-01T11:36:25.4408274Z"},{"Id":"ABC|CZ-J_1S4810L1_20227Z","DocType":"REC","Project":"VARYJAM_GUIK","ProjectId":"VARYJAM_GUIK_09990ISDF_20227Z","Tags":[],"Properties":{"WindowsUUID":"4IIAE4CC-35EA-1190-A85C-EC54B61DC9EE","X4SampleID":"9375953074","uDriverVersion":"v1_2_3"},"Categories":[],"Trigger":true,"Received":"2020-10-01T11:36:25.4408446Z"},{"Id":"ABC|CZ-J_1S4810L1_2020Z55","DocType":"REC","Project":"VARYJAM_GUIK","ProjectId":"VARYJAM_GUIK_09990ISDF_20205Z","Tags":[],"Properties":{"WindowsUUID":"0009AE3CC-35EA-11B2-A85C-EC54B6BO9EE","X4SampleID":"9375953074","uDriverVersion":"v1_2_3"},"Categories":[],"Trigger":true,"Received":"2020-10-01T11:36:25.4408616Z"}]
Most helpful comment
I guess the error message should be more explicit. instead of just telling
One of the specified inputs is invalidit should be explicit which input value exactly is invalid.Also, I get the same error when setting
TypeNameHandling.All,TypeNameHandling.AutoandTypeNameHandling.Nonewhen replacing an document. So there might be a different reason for this issue.