I am trying insert a dumb entity into an Azure Storage Table in javascript using Insert Entity API. I enabled CORS and managed to get my request authenticated, but my dead simple request is failing with One of the request inputs is not valid.
message
Here is more details on the request:
Accept:application/json;odata=nometadata
Accept-Encoding:gzip, deflate
Accept-Language:en-US,en;q=0.8
Authorization:SharedKey <account>:<secret>
Cache-Control:no-cache
Connection:keep-alive
Content-Length:70
Content-type:application/json
DataServiceVersion:3.0;NetFx
Host:<account>.table.core.windows.net
If-Match:*
MaxDataServiceVersion:3.0;NetFx
Origin:http://localhost:6091
Referer:http://localhost:6091/
x-ms-date:Fri, 08 Jan 2016 06:23:29 GMT
x-ms-version:2013-08-15
Here is the request payload:
{Message: "test", RowKey: "myrowkey", PartitionKey: "mypartitionkey"}
And here is the response, which has a HTTP status 400:
Access-Control-Allow-Origin:*
Access-Control-Expose-Headers:x-ms-request-id,x-ms-version
Content-Type:application/json;odata=nometadata;streaming=true;charset=utf-8
Date:Fri, 08 Jan 2016 06:23:30 GMT
Server:Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0
Transfer-Encoding:chunked
X-Content-Type-Options:nosniff
x-ms-request-id:4994f291-0002-004d-1cdd-49d7ff000000
x-ms-version:2013-08-15
with a body:
{"odata.error":{"code":"InvalidInput","message":{"lang":"en-US","value":"One of the request inputs is not valid.\nRequestId:4994f291-0002-004d-1cdd-49d7ff000000\nTime:2016-01-08T06:23:30.4716844Z"}}}
I have seen people complaining about this non-descriptive error message. However, I am pretty sure this request payload is fine. RowKey
and PartitionKey
do not have special characters and Message
field doesn't have to provide its odata
type (but believe me, I tried that too). I tried the payload provided as an example too, still the issue is there.