Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Table service returns 400 not 412 for an unexpected weak etag #1229

Closed
joelverhagen opened this issue Dec 18, 2021 · 0 comments · Fixed by #1231
Closed

Table service returns 400 not 412 for an unexpected weak etag #1229

joelverhagen opened this issue Dec 18, 2021 · 0 comments · Fixed by #1231
Assignees

Comments

@joelverhagen
Copy link
Contributor

Which service(blob, file, queue, table) does this issue concern?

table

Which version of the Azurite was used?

3.15.0

Where do you get Azurite? (npm, DockerHub, NuGet, Visual Studio Code Extension)

VS Code extension

What's the Node.js version?

16.13.0

What problem was encountered?

When a non-standard weak etag, e.g. W/"wrong", is provided, HTTP 400 is returns instead of HTTP 412. Azure and Storage Emulator return 412 for this etag.

This is not a huge deal but I happened to have a test in my code that was testing a bad etag like this expecting it to be accepted to the system but rejected for never matching. Since this is very much an edge case, feel free to close this if you don't want a fix. I'd be happy to provide a fix and test.

Steps to reproduce the issue?

using Azure;
using Azure.Data.Tables;

var tableClient = new TableServiceClient("UseDevelopmentStorage=true");
var table = tableClient.GetTableClient("table0");
table.Delete();
table.Create();
table.AddEntity(new TableEntity("PK", "RK1"));

try
{
    table.UpdateEntity(new TableEntity("PK", "RK1"), new ETag("W/\"wrong\""));
}
catch (RequestFailedException ex)
{
    Console.WriteLine("Status: " + ex.Status);
}
2021-12-18T23:35:59.952Z 	 info: Azurite Blob service is starting on 127.0.0.1:10000
2021-12-18T23:35:59.954Z 	 info: AccountDataStore:init() Refresh accounts from environment variable AZURITE_ACCOUNTS with value undefined
2021-12-18T23:35:59.954Z 	 info: AccountDataStore:init() Fallback to default emulator account devstoreaccount1.
2021-12-18T23:35:59.993Z 	 info: BlobGCManager:start() Starting BlobGCManager. Set status to Initializing.
2021-12-18T23:35:59.994Z 	 info: BlobGCManager:start() Trigger mark and sweep loop. Set status to Running.
2021-12-18T23:35:59.994Z 	 info: BlobGCManager:markSweepLoop() Start next mark and sweep.
2021-12-18T23:35:59.994Z 	 info: BlobGCManager:markSweep() Get all extents.
2021-12-18T23:35:59.995Z 	 info: BlobGCManager:start() BlobGCManager successfully started.
2021-12-18T23:36:00.009Z 	 info: BlobGCManager:markSweep() Got 0 extents.
2021-12-18T23:36:00.009Z 	 info: BlobGCManager:markSweep() Get referred extents.
2021-12-18T23:36:00.010Z 	 info: BlobGCManager:markSweep() Got referred extents, unreferenced extents count is 0.
2021-12-18T23:36:00.011Z 	 info: BlobGCManager:markSweepLoop() Mark and sweep finished, taken 17ms.
2021-12-18T23:36:00.011Z 	 info: BlobGCManager:markSweepLoop() Sleep for 600000ms.
2021-12-18T23:36:00.014Z 	 info: Azurite Blob service successfully listens on http://127.0.0.1:10000
2021-12-18T23:36:00.016Z 	 info: Azurite Queue service is starting on 127.0.0.1:10001
2021-12-18T23:36:00.016Z 	 info: AccountDataStore:init() Refresh accounts from environment variable AZURITE_ACCOUNTS with value undefined
2021-12-18T23:36:00.016Z 	 info: AccountDataStore:init() Fallback to default emulator account devstoreaccount1.
2021-12-18T23:36:00.040Z 	 info: QueueGCManager:start() Starting QueueGCManager, set status to Initializing
2021-12-18T23:36:00.040Z 	 info: QueueGCManager:start() Trigger mark and sweep loop, set status to Running.
2021-12-18T23:36:00.041Z 	 info: QueueGCManager:markSweepLoop() Start new mark and sweep.
2021-12-18T23:36:00.041Z 	 info: QueueGCManger:markSweep() Get all extents.
2021-12-18T23:36:00.041Z 	 info: QueueGCManager:start() QueueGCManager successfully started.
2021-12-18T23:36:00.041Z 	 info: QueueGCManager:marksweep() Get 0 extents.
2021-12-18T23:36:00.042Z 	 info: QueueGCManager:markSweep() Get referred extents, then remove from allExtents.
2021-12-18T23:36:00.042Z 	 info: QueueGCManager:markSweep() Got referred extents, unreferenced extents count is 0.
2021-12-18T23:36:00.042Z 	 info: QueueGCManager:markSweepLoop() Mark and sweep finished, take 1ms.
2021-12-18T23:36:00.042Z 	 info: QueueGCManager:markSweepLoop() Sleep for 60000
2021-12-18T23:36:00.044Z 	 info: Azurite Queue service successfully listens on http://127.0.0.1:10001
2021-12-18T23:36:00.045Z 	 info: Azurite Table service is starting on 127.0.0.1:10002
2021-12-18T23:36:00.045Z 	 info: AccountDataStore:init() Refresh accounts from environment variable AZURITE_ACCOUNTS with value undefined
2021-12-18T23:36:00.045Z 	 info: AccountDataStore:init() Fallback to default emulator account devstoreaccount1.
2021-12-18T23:36:00.056Z 	 info: Azurite Table service successfully listens on http://127.0.0.1:10002
2021-12-18T23:36:01.989Z ad708085-38a5-4eea-b950-dbcc42f0586d info: TableStorageContextMiddleware: RequestMethod=DELETE RequestURL=http://127.0.0.1/devstoreaccount1/Tables('table0') RequestHeaders:{"host":"127.0.0.1:10002","x-ms-version":"2019-02-02","accept":"application/json","x-ms-client-request-id":"9fb66edc-3c8b-4498-8943-d8ef1f3a976e","x-ms-return-client-request-id":"true","user-agent":"azsdk-net-Data.Tables/12.3.0 (.NET 6.0.0-rtm.21522.10; Microsoft Windows 10.0.22000)","x-ms-date":"Sat, 18 Dec 2021 23:36:01 GMT","authorization":"SharedKeyLite devstoreaccount1:EkaOQ2BM1xjQp9XO7ocsEHnvqU5Gx/M5hgFtZAFb0+c="} ClientIP=127.0.0.1 Protocol=http HTTPVersion=1.1
2021-12-18T23:36:01.990Z ad708085-38a5-4eea-b950-dbcc42f0586d debug: tableStorageContextMiddleware: Dispatch pattern string: /Tables('table0')
2021-12-18T23:36:01.990Z ad708085-38a5-4eea-b950-dbcc42f0586d info: tableStorageContextMiddleware: Account=devstoreaccount1 tableName=table0
2021-12-18T23:36:01.990Z ad708085-38a5-4eea-b950-dbcc42f0586d verbose: DispatchMiddleware: Dispatching request...
2021-12-18T23:36:01.992Z ad708085-38a5-4eea-b950-dbcc42f0586d info: DispatchMiddleware: Operation=Table_Delete
2021-12-18T23:36:01.993Z ad708085-38a5-4eea-b950-dbcc42f0586d verbose: AuthenticationMiddlewareFactory:createAuthenticationMiddleware() Validating authentications.
2021-12-18T23:36:01.993Z ad708085-38a5-4eea-b950-dbcc42f0586d info: TableSharedKeyLiteAuthenticator:validate() Start validation against account shared key authentication.
2021-12-18T23:36:01.994Z ad708085-38a5-4eea-b950-dbcc42f0586d info: TableSharedKeyLiteAuthenticator:validate() [STRING TO SIGN]:"Sat, 18 Dec 2021 23:36:01 GMT\n/devstoreaccount1/devstoreaccount1/Tables('table0')"
2021-12-18T23:36:01.995Z ad708085-38a5-4eea-b950-dbcc42f0586d info: TableSharedKeyLiteAuthenticator:validate() Calculated authentication header based on key1: SharedKeyLite devstoreaccount1:EkaOQ2BM1xjQp9XO7ocsEHnvqU5Gx/M5hgFtZAFb0+c=
2021-12-18T23:36:01.995Z ad708085-38a5-4eea-b950-dbcc42f0586d info: TableSharedKeyLiteAuthenticator:validate() Signature 1 matched.
2021-12-18T23:36:01.996Z ad708085-38a5-4eea-b950-dbcc42f0586d verbose: DeserializerMiddleware: Start deserializing...
2021-12-18T23:36:01.999Z ad708085-38a5-4eea-b950-dbcc42f0586d info: HandlerMiddleware: DeserializedParameters={"version":"2019-02-02","options":{"requestId":"9fb66edc-3c8b-4498-8943-d8ef1f3a976e"}}
2021-12-18T23:36:02.002Z ad708085-38a5-4eea-b950-dbcc42f0586d verbose: SerializerMiddleware: Start serializing...
2021-12-18T23:36:02.004Z ad708085-38a5-4eea-b950-dbcc42f0586d info: EndMiddleware: End response. TotalTimeInMS=15 StatusCode=204 StatusMessage=undefined Headers={"server":"Azurite-Table/3.15.0","content-type":"application/json;odata=minimalmetadata","x-ms-client-request-id":"9fb66edc-3c8b-4498-8943-d8ef1f3a976e","x-ms-request-id":"ad708085-38a5-4eea-b950-dbcc42f0586d","x-ms-version":"2021-02-12","date":"Sat, 18 Dec 2021 23:36:01 GMT"}
2021-12-18T23:36:02.028Z e7ea300b-d260-4b23-b5ef-55d8c8084b11 info: TableStorageContextMiddleware: RequestMethod=POST RequestURL=http://127.0.0.1/devstoreaccount1/Tables?$format=application%2Fjson%3Bodata%3Dminimalmetadata RequestHeaders:{"host":"127.0.0.1:10002","x-ms-version":"2019-02-02","dataserviceversion":"3.0","accept":"application/json;odata=minimalmetadata","x-ms-client-request-id":"f2e4201b-3796-4c1f-b30c-f499ee2a592a","x-ms-return-client-request-id":"true","user-agent":"azsdk-net-Data.Tables/12.3.0 (.NET 6.0.0-rtm.21522.10; Microsoft Windows 10.0.22000)","x-ms-date":"Sat, 18 Dec 2021 23:36:02 GMT","authorization":"SharedKeyLite devstoreaccount1:fmNy2IbbvrNDgsvH/zp150IOow8QKxkwqr78TS0kaeE=","content-type":"application/json;odata=nometadata","content-length":"22"} ClientIP=127.0.0.1 Protocol=http HTTPVersion=1.1
2021-12-18T23:36:02.028Z e7ea300b-d260-4b23-b5ef-55d8c8084b11 debug: tableStorageContextMiddleware: Dispatch pattern string: /Tables
2021-12-18T23:36:02.028Z e7ea300b-d260-4b23-b5ef-55d8c8084b11 info: tableStorageContextMiddleware: Account=devstoreaccount1 tableName=undefined
2021-12-18T23:36:02.029Z e7ea300b-d260-4b23-b5ef-55d8c8084b11 verbose: DispatchMiddleware: Dispatching request...
2021-12-18T23:36:02.029Z e7ea300b-d260-4b23-b5ef-55d8c8084b11 info: DispatchMiddleware: Operation=Table_Create
2021-12-18T23:36:02.029Z e7ea300b-d260-4b23-b5ef-55d8c8084b11 verbose: AuthenticationMiddlewareFactory:createAuthenticationMiddleware() Validating authentications.
2021-12-18T23:36:02.029Z e7ea300b-d260-4b23-b5ef-55d8c8084b11 info: TableSharedKeyLiteAuthenticator:validate() Start validation against account shared key authentication.
2021-12-18T23:36:02.029Z e7ea300b-d260-4b23-b5ef-55d8c8084b11 info: TableSharedKeyLiteAuthenticator:validate() [STRING TO SIGN]:"Sat, 18 Dec 2021 23:36:02 GMT\n/devstoreaccount1/devstoreaccount1/Tables"
2021-12-18T23:36:02.029Z e7ea300b-d260-4b23-b5ef-55d8c8084b11 info: TableSharedKeyLiteAuthenticator:validate() Calculated authentication header based on key1: SharedKeyLite devstoreaccount1:fmNy2IbbvrNDgsvH/zp150IOow8QKxkwqr78TS0kaeE=
2021-12-18T23:36:02.029Z e7ea300b-d260-4b23-b5ef-55d8c8084b11 info: TableSharedKeyLiteAuthenticator:validate() Signature 1 matched.
2021-12-18T23:36:02.030Z e7ea300b-d260-4b23-b5ef-55d8c8084b11 verbose: DeserializerMiddleware: Start deserializing...
2021-12-18T23:36:02.032Z e7ea300b-d260-4b23-b5ef-55d8c8084b11 debug: deserialize(): Raw request body string is (removed all empty characters) {"TableName":"table0"}
2021-12-18T23:36:02.033Z e7ea300b-d260-4b23-b5ef-55d8c8084b11 info: HandlerMiddleware: DeserializedParameters={"options":{"queryOptions":{"format":"application/json;odata=minimalmetadata"},"requestId":"f2e4201b-3796-4c1f-b30c-f499ee2a592a","dataServiceVersion":"3.0"},"version":"2019-02-02","tableProperties":{"tableName":"table0"},"body":"ReadableStream"}
2021-12-18T23:36:02.035Z e7ea300b-d260-4b23-b5ef-55d8c8084b11 verbose: SerializerMiddleware: Start serializing...
2021-12-18T23:36:02.036Z e7ea300b-d260-4b23-b5ef-55d8c8084b11 debug: Serializer: Raw response body string is {"odata.metadata":"http://127.0.0.1:10002/devstoreaccount1/$metadata#Tables/@Element","TableName":"table0"}
2021-12-18T23:36:02.036Z e7ea300b-d260-4b23-b5ef-55d8c8084b11 info: Serializer: Start returning stream body.
2021-12-18T23:36:02.036Z e7ea300b-d260-4b23-b5ef-55d8c8084b11 info: EndMiddleware: End response. TotalTimeInMS=8 StatusCode=201 StatusMessage=Created Headers={"server":"Azurite-Table/3.15.0","content-type":"application/json;odata=minimalmetadata","x-ms-client-request-id":"f2e4201b-3796-4c1f-b30c-f499ee2a592a","x-ms-request-id":"e7ea300b-d260-4b23-b5ef-55d8c8084b11","x-ms-version":"2021-02-12","date":"Sat, 18 Dec 2021 23:36:02 GMT","preference-applied":"return-content"}
2021-12-18T23:36:02.069Z 6ed6960f-8c2c-457c-939e-b0c87baf3c36 info: TableStorageContextMiddleware: RequestMethod=POST RequestURL=http://127.0.0.1/devstoreaccount1/table0?$format=application%2Fjson%3Bodata%3Dminimalmetadata RequestHeaders:{"host":"127.0.0.1:10002","x-ms-version":"2019-02-02","dataserviceversion":"3.0","prefer":"return-no-content","accept":"application/json;odata=minimalmetadata","x-ms-client-request-id":"45bc9dce-1aa9-45be-89a8-42b1fb6422e5","x-ms-return-client-request-id":"true","user-agent":"azsdk-net-Data.Tables/12.3.0 (.NET 6.0.0-rtm.21522.10; Microsoft Windows 10.0.22000)","x-ms-date":"Sat, 18 Dec 2021 23:36:02 GMT","authorization":"SharedKeyLite devstoreaccount1:j4/I52vtHVg+5W/mzD6tD4XnnIvVBtm5Q47N0snXKzo=","content-type":"application/json;odata=nometadata","content-length":"36"} ClientIP=127.0.0.1 Protocol=http HTTPVersion=1.1
2021-12-18T23:36:02.070Z 6ed6960f-8c2c-457c-939e-b0c87baf3c36 debug: tableStorageContextMiddleware: Dispatch pattern string: /table0
2021-12-18T23:36:02.070Z 6ed6960f-8c2c-457c-939e-b0c87baf3c36 info: tableStorageContextMiddleware: Account=devstoreaccount1 tableName=table0
2021-12-18T23:36:02.070Z 6ed6960f-8c2c-457c-939e-b0c87baf3c36 verbose: DispatchMiddleware: Dispatching request...
2021-12-18T23:36:02.070Z 6ed6960f-8c2c-457c-939e-b0c87baf3c36 info: DispatchMiddleware: Operation=Table_InsertEntity
2021-12-18T23:36:02.070Z 6ed6960f-8c2c-457c-939e-b0c87baf3c36 verbose: AuthenticationMiddlewareFactory:createAuthenticationMiddleware() Validating authentications.
2021-12-18T23:36:02.071Z 6ed6960f-8c2c-457c-939e-b0c87baf3c36 info: TableSharedKeyLiteAuthenticator:validate() Start validation against account shared key authentication.
2021-12-18T23:36:02.071Z 6ed6960f-8c2c-457c-939e-b0c87baf3c36 info: TableSharedKeyLiteAuthenticator:validate() [STRING TO SIGN]:"Sat, 18 Dec 2021 23:36:02 GMT\n/devstoreaccount1/devstoreaccount1/table0"
2021-12-18T23:36:02.071Z 6ed6960f-8c2c-457c-939e-b0c87baf3c36 info: TableSharedKeyLiteAuthenticator:validate() Calculated authentication header based on key1: SharedKeyLite devstoreaccount1:j4/I52vtHVg+5W/mzD6tD4XnnIvVBtm5Q47N0snXKzo=
2021-12-18T23:36:02.071Z 6ed6960f-8c2c-457c-939e-b0c87baf3c36 info: TableSharedKeyLiteAuthenticator:validate() Signature 1 matched.
2021-12-18T23:36:02.072Z 6ed6960f-8c2c-457c-939e-b0c87baf3c36 verbose: DeserializerMiddleware: Start deserializing...
2021-12-18T23:36:02.072Z 6ed6960f-8c2c-457c-939e-b0c87baf3c36 debug: deserialize(): Raw request body string is (removed all empty characters) {"PartitionKey":"PK","RowKey":"RK1"}
2021-12-18T23:36:02.073Z 6ed6960f-8c2c-457c-939e-b0c87baf3c36 info: HandlerMiddleware: DeserializedParameters={"options":{"queryOptions":{"format":"application/json;odata=minimalmetadata"},"requestId":"45bc9dce-1aa9-45be-89a8-42b1fb6422e5","dataServiceVersion":"3.0","responsePreference":"return-no-content","tableEntityProperties":{"PartitionKey":"PK","RowKey":"RK1"}},"version":"2019-02-02","body":"ReadableStream"}
2021-12-18T23:36:02.075Z 6ed6960f-8c2c-457c-939e-b0c87baf3c36 verbose: SerializerMiddleware: Start serializing...
2021-12-18T23:36:02.076Z 6ed6960f-8c2c-457c-939e-b0c87baf3c36 info: EndMiddleware: End response. TotalTimeInMS=6 StatusCode=204 StatusMessage=undefined Headers={"server":"Azurite-Table/3.15.0","content-type":"application/json;odata=minimalmetadata","x-ms-client-request-id":"45bc9dce-1aa9-45be-89a8-42b1fb6422e5","x-ms-request-id":"6ed6960f-8c2c-457c-939e-b0c87baf3c36","x-ms-version":"2021-02-12","date":"Sat, 18 Dec 2021 23:36:02 GMT","etag":"W/\"datetime'2021-12-18T23%3A36%3A02.0690000Z'\"","preference-applied":"return-no-content"}
2021-12-18T23:36:02.083Z f6ed33fe-46f5-4874-ae51-5c5716f96e38 info: TableStorageContextMiddleware: RequestMethod=PATCH RequestURL=http://127.0.0.1/devstoreaccount1/table0(PartitionKey='PK',RowKey='RK1')?$format=application%2Fjson%3Bodata%3Dminimalmetadata RequestHeaders:{"host":"127.0.0.1:10002","x-ms-version":"2019-02-02","dataserviceversion":"3.0","if-match":"W/\"wrong\"","accept":"application/json","x-ms-client-request-id":"415aab19-4bb4-4575-9af6-c6fedfa2198a","x-ms-return-client-request-id":"true","user-agent":"azsdk-net-Data.Tables/12.3.0 (.NET 6.0.0-rtm.21522.10; Microsoft Windows 10.0.22000)","x-ms-date":"Sat, 18 Dec 2021 23:36:02 GMT","authorization":"SharedKeyLite devstoreaccount1:KjmTOmNbeLWCwEskdCEWplwGcWlSTmQKjUZ7i+bUHck=","content-type":"application/json","content-length":"36"} ClientIP=127.0.0.1 Protocol=http HTTPVersion=1.1
2021-12-18T23:36:02.083Z f6ed33fe-46f5-4874-ae51-5c5716f96e38 debug: tableStorageContextMiddleware: Dispatch pattern string: /table0(PartitionKey='PLACEHOLDER',RowKey='PLACEHOLDER')
2021-12-18T23:36:02.083Z f6ed33fe-46f5-4874-ae51-5c5716f96e38 info: tableStorageContextMiddleware: Account=devstoreaccount1 tableName=table0
2021-12-18T23:36:02.084Z f6ed33fe-46f5-4874-ae51-5c5716f96e38 verbose: DispatchMiddleware: Dispatching request...
2021-12-18T23:36:02.084Z f6ed33fe-46f5-4874-ae51-5c5716f96e38 info: DispatchMiddleware: Operation=Table_MergeEntity
2021-12-18T23:36:02.084Z f6ed33fe-46f5-4874-ae51-5c5716f96e38 verbose: AuthenticationMiddlewareFactory:createAuthenticationMiddleware() Validating authentications.
2021-12-18T23:36:02.084Z f6ed33fe-46f5-4874-ae51-5c5716f96e38 info: TableSharedKeyLiteAuthenticator:validate() Start validation against account shared key authentication.
2021-12-18T23:36:02.085Z f6ed33fe-46f5-4874-ae51-5c5716f96e38 info: TableSharedKeyLiteAuthenticator:validate() [STRING TO SIGN]:"Sat, 18 Dec 2021 23:36:02 GMT\n/devstoreaccount1/devstoreaccount1/table0(PartitionKey='PK',RowKey='RK1')"
2021-12-18T23:36:02.085Z f6ed33fe-46f5-4874-ae51-5c5716f96e38 info: TableSharedKeyLiteAuthenticator:validate() Calculated authentication header based on key1: SharedKeyLite devstoreaccount1:KjmTOmNbeLWCwEskdCEWplwGcWlSTmQKjUZ7i+bUHck=
2021-12-18T23:36:02.085Z f6ed33fe-46f5-4874-ae51-5c5716f96e38 info: TableSharedKeyLiteAuthenticator:validate() Signature 1 matched.
2021-12-18T23:36:02.085Z f6ed33fe-46f5-4874-ae51-5c5716f96e38 verbose: DeserializerMiddleware: Start deserializing...
2021-12-18T23:36:02.086Z f6ed33fe-46f5-4874-ae51-5c5716f96e38 debug: deserialize(): Raw request body string is (removed all empty characters) {"PartitionKey":"PK","RowKey":"RK1"}
2021-12-18T23:36:02.086Z f6ed33fe-46f5-4874-ae51-5c5716f96e38 info: HandlerMiddleware: DeserializedParameters={"options":{"queryOptions":{"format":"application/json;odata=minimalmetadata"},"requestId":"415aab19-4bb4-4575-9af6-c6fedfa2198a","dataServiceVersion":"3.0","ifMatch":"W/\"wrong\"","tableEntityProperties":{"PartitionKey":"PK","RowKey":"RK1"}},"version":"2019-02-02","body":"ReadableStream"}
2021-12-18T23:36:02.088Z f6ed33fe-46f5-4874-ae51-5c5716f96e38 error: ErrorMiddleware: Received a MiddlewareError, fill error information to HTTP response
2021-12-18T23:36:02.111Z f6ed33fe-46f5-4874-ae51-5c5716f96e38 error: ErrorMiddleware: ErrorName=StorageError ErrorMessage=""  ErrorHTTPStatusCode=400 ErrorHTTPStatusMessage=undefined ErrorHTTPHeaders={"x-ms-error-code":"InvalidOperation","x-ms-request-id":"f6ed33fe-46f5-4874-ae51-5c5716f96e38","x-ms-version":"2021-02-12"} ErrorHTTPBody="{\"odata.error\":{\"code\":\"InvalidOperation\",\"message\":{\"lang\":\"en-US\",\"value\":\"\\nRequestId:f6ed33fe-46f5-4874-ae51-5c5716f96e38\\nTime:2021-12-18T23:36:02.087Z\"}}}" ErrorStack="\"StorageError\\n    at Function.getInvalidOperation (C:\\\\z\\\\Git\\\\joelverhagen\\\\Azurite\\\\src\\\\table\\\\errors\\\\StorageErrorFactory.ts:73:12)\\n    at TableHandler.mergeEntity (C:\\\\z\\\\Git\\\\joelverhagen\\\\Azurite\\\\src\\\\table\\\\handlers\\\\TableHandler.ts:384:35)\\n    at C:\\\\z\\\\Git\\\\joelverhagen\\\\Azurite\\\\src\\\\table\\\\generated\\\\middleware\\\\HandlerMiddlewareFactory.ts:82:10\\n    at C:\\\\z\\\\Git\\\\joelverhagen\\\\Azurite\\\\src\\\\table\\\\generated\\\\ExpressMiddlewareFactory.ts:97:57\\n    at Layer.handle [as handle_request] (C:\\\\z\\\\Git\\\\joelverhagen\\\\Azurite\\\\node_modules\\\\express\\\\lib\\\\router\\\\layer.js:95:5)\\n    at trim_prefix (C:\\\\z\\\\Git\\\\joelverhagen\\\\Azurite\\\\node_modules\\\\express\\\\lib\\\\router\\\\index.js:317:13)\\n    at C:\\\\z\\\\Git\\\\joelverhagen\\\\Azurite\\\\node_modules\\\\express\\\\lib\\\\router\\\\index.js:284:7\\n    at Function.process_params (C:\\\\z\\\\Git\\\\joelverhagen\\\\Azurite\\\\node_modules\\\\express\\\\lib\\\\router\\\\index.js:335:12)\\n    at next (C:\\\\z\\\\Git\\\\joelverhagen\\\\Azurite\\\\node_modules\\\\express\\\\lib\\\\router\\\\index.js:275:10)\\n    at processTicksAndRejections (node:internal/process/task_queues:96:5)\""
2021-12-18T23:36:02.111Z f6ed33fe-46f5-4874-ae51-5c5716f96e38 error: ErrorMiddleware: Set HTTP code: 400
2021-12-18T23:36:02.111Z f6ed33fe-46f5-4874-ae51-5c5716f96e38 error: ErrorMiddleware: Set HTTP Header: x-ms-error-code=InvalidOperation
2021-12-18T23:36:02.111Z f6ed33fe-46f5-4874-ae51-5c5716f96e38 error: ErrorMiddleware: Set HTTP Header: x-ms-request-id=f6ed33fe-46f5-4874-ae51-5c5716f96e38
2021-12-18T23:36:02.111Z f6ed33fe-46f5-4874-ae51-5c5716f96e38 error: ErrorMiddleware: Set HTTP Header: x-ms-version=2021-02-12
2021-12-18T23:36:02.111Z f6ed33fe-46f5-4874-ae51-5c5716f96e38 error: ErrorMiddleware: Set content type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8
2021-12-18T23:36:02.111Z f6ed33fe-46f5-4874-ae51-5c5716f96e38 error: ErrorMiddleware: Set HTTP body: "{\"odata.error\":{\"code\":\"InvalidOperation\",\"message\":{\"lang\":\"en-US\",\"value\":\"\\nRequestId:f6ed33fe-46f5-4874-ae51-5c5716f96e38\\nTime:2021-12-18T23:36:02.087Z\"}}}"
2021-12-18T23:36:02.113Z f6ed33fe-46f5-4874-ae51-5c5716f96e38 info: EndMiddleware: End response. TotalTimeInMS=30 StatusCode=400 StatusMessage=Bad Request Headers={"server":"Azurite-Table/3.15.0","x-ms-error-code":"InvalidOperation","x-ms-request-id":"f6ed33fe-46f5-4874-ae51-5c5716f96e38","x-ms-version":"2021-02-12","content-type":"application/json;odata=minimalmetadata;streaming=true;charset=utf-8"}
2021-12-18T23:36:07.905Z 	 info: Azurite Blob service is closing...
2021-12-18T23:36:07.905Z 	 info: Azurite Queue service is closing...
2021-12-18T23:36:07.906Z 	 info: Azurite Table service is closing...
2021-12-18T23:36:07.908Z 	 info: BlobGCManager:close() Start closing BlobGCManager. Set status to Closing.
2021-12-18T23:36:07.908Z 	 info: QueueGCManager:close() Start closing QueueGCManager, set status to Closing.
2021-12-18T23:36:07.909Z 	 info: BlobGCManager:start() Mark and sweep loop is closed.
2021-12-18T23:36:07.909Z 	 info: BlobGCManager:close() BlobGCManager successfully closed. Set status to Closed.
2021-12-18T23:36:07.909Z 	 info: QueueGCManager:start() Mark and sweep loop is closed.
2021-12-18T23:36:07.909Z 	 info: QueueGCManager:close() QueueGCManager successfully closed, set status to Closed.
2021-12-18T23:36:07.909Z 	 info: Azurite Table service successfully closed
2021-12-18T23:36:07.910Z 	 info: Azurite Blob service successfully closed
2021-12-18T23:36:07.910Z 	 info: Azurite Queue service successfully closed

Please be sure to remove any PII or sensitive information before sharing!
The debug log will log raw request headers and bodies, so that we can replay these against Azurite using REST and create tests to validate resolution.

Have you found a mitigation/solution?

@edwin-huber edwin-huber self-assigned this Feb 14, 2022
XiaoningLiu pushed a commit that referenced this issue Feb 16, 2022
…happen) (#1231)

* Allow any weak etag even if it doesn't match the pattern (412 should happen)

Fix #1229

* Add changelog and polish comment

* Move Table utils out of the common utils
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants