Comments (5)
'Unexpected Response Code for Operation: 1' basically means that the operation at index 1 (i.e. the second operation) in the batch failed. The index of the failed operation is returned in the error thrown so it makes it easier for users to go and change the specific operation in the batch that failed.
You can get more information about the request that failed and the error by catching the StorageException and checking exception.RequestInformation.HttpStatusCode, exception.RequestInformation.ExtendedErrorInformation.ErrorCode and exception.RequestInformation.ExtendedErrorInformation.ErrorMessage. These should tell you that the request input is invalid.
The same information is also available in the OperationContext's last result if you use an OperationContext to track the request and use suitable method overloads that take in the OperationContext.
We will look at changing the error message in the future so it is less confusing. Thanks for the feedback!
from azure-storage-net.
We've made this message more clear in our 6.0.0 release -- it now reads: "Element i in the batch returned an unexpected response code." with i being the relevant index. Thanks for the feedback!
from azure-storage-net.
Why does it throw an error to begin with, or really why does it kill the batch? I've got a batch operation that is filled over and over again via a loop. Each individual entity is InsertOrMerge which shouldn't care if I put 100 entities in it with the same partition and row keys. There will be occasions when a duplicate will happen due to improper data entry, but I'm OK with that as long as the batch runs. Is there a way to code around this without having to dig through my batch and remove these entities? I'm asking all this because if I wasn't batching these it'd work fine, which is a pretty big con for batching. It seems like it'd make a lot more sense to provide a batch log that we could pull vs killing a batch and throwing an exception for something that would run outside of a batch.
from azure-storage-net.
This delightfully unhelpful error Microsoft.Azure.Cosmos.Table.StorageException: Element 0 in the batch returned an unexpected response code
can also occur if you have a disallowed character in PartionKey
or RowKey
@tbithell I investigated the problem by catching StorageException
and within that iterate over TableOperation.InsertOrReplace
which still returned a rather useless 400 BadRequest
My problem item was a forward slash in RowKey
.
from azure-storage-net.
Table support has moved to the CosmosDB NuGet package. Please follow up there.
https://www.nuget.org/packages/Microsoft.Azure.Cosmos.Table
from azure-storage-net.
Related Issues (20)
- The MD5 value specified in the request did not match with the MD5 value calculated by the server HOT 1
- Setting blob metadata with empty string VALUE but valid key STILL throws exception
- CanRead does not really reflect if the Blob can be read after disposing
- Azure storage is requiring Cultures to be installed instead of using Invariant culture support breaking Dockerized apps etc. HOT 7
- Can't start Storage Emulator.
- Read streams do not buffer, resulting in multiple redundant HTTP requests. HOT 1
- Server Failed to authenticate the request.
- BlobClient chop off the name when the blob name contains #
- Token for Storage Account- Managed Identity
- Questions regarding Infrastructure encryption
- This repo is missing important files
- Container soft delete does not seem to be supported in ChinaNorth2
- Data factory custom activity (batch) -> storage - 403 BlobAccessDenied HOT 1
- BlobClient, file intermittently not released with UploadAsync HOT 1
- Trying to create a container, inside a contaner HOT 1
- CloudBlob.DownloadRangeToByteArray() hangs in some circumstances
- Html encoded meta data displays as encoded in Blob Container Storage Account portal
- ErrorCode vs ExtendedErrorInformation.ErrorCode HOT 1
- File upload very slow for File shares v12 for large files.
- Custom metadata for Azure queue message
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from azure-storage-net.