feedback icon indicating copy to clipboard operation
feedback copied to clipboard

Azure Storage Queue Documentation incorrect

Open spartymants opened this issue 5 years ago • 9 comments

I've identified an issue with the Azure Storage Rest API documentation for the delete method.

The delete message documentation does not appear to be correct Delete Message

The document states that the following uri must be used https://myaccount.queue.core.windows.net/myqueue/messages/messageid?popreceipt=string-value

There is no mention of messageid path attribute in the doc other than it be included in the uri.

if the /messageid (the literal or the actual message id from the azure storage queue item) is included in the path it results in an error

image

<?xml version="1.0" encoding="utf-8"?><Error><Code>InvalidQueryParameterValue</Code><Message>Value for one of the query parameters specified in the request URI is invalid.
RequestId:a732d09d-4003-0018-8088-3eee34000000
Time:2020-06-09T18:08:29.5167204Z</Message>
<QueryParameterName>popreceipt</QueryParameterName>
<QueryParameterValue>AgAAAAMAAAAAAAAAYUMWAIg 1gE=</QueryParameterValue>
<Reason>Invalid pop receipt format</Reason>
</Error>

If the /messageid is removed then a 204 is returned as expected

image

Happy to help fixing the doc if you point me at the relevant location on github.

spartymants avatar Jun 09 '20 18:06 spartymants

Thank you for creating the issue! One of our team members will get back to you shortly with additional information. If this is a product issue, please close this and contact the particular product's support instead (see https://support.microsoft.com/allproducts for the list of support websites).

welcome[bot] avatar Jun 09 '20 18:06 welcome[bot]

The REST request issue appears to have been resolved. So the documentation is somewhat valid ... however it might be prudent to include where the message id is sourced from, as you specify for the popreceipt

spartymants avatar Jun 10 '20 13:06 spartymants

This seems to be a different bug, I get the same error when the pop receipt has a + in the middle. As you can see you submitted AgAAAAMAAAAAAAAAYUMWAIg+1gE= but you got the error that AgAAAAMAAAAAAAAAYUMWAIg 1gE= format is invalid

guillene avatar Feb 10 '21 14:02 guillene

@guillene The same problem happens to me too. Did you find a solution for the bug?

yehudaQ avatar Aug 09 '21 19:08 yehudaQ

Yes, you need to encode the URL before you send it. Some programming languages have libraries for that, in my case, I did a simple string replace every time I find a "+" to a "%2b" and works like a charm 😄

guillene avatar Aug 09 '21 20:08 guillene

@guillene Thank you so much!! As you said, works like a charm!

yehudaQ avatar Aug 09 '21 20:08 yehudaQ

My issue was that the message id within the URL doesn't look like a path parameter. I would have expected something like:

https://myaccount.queue.core.windows.net/myqueue/messages/{messageid}?popreceipt=string-value

Nzglobal avatar Oct 01 '22 02:10 Nzglobal

OMG I just spend 1h chasing it. The documentation really should be more obvious.

https://myaccount.queue.core.windows.net/myqueue/messages/messageid?popreceipt=string-value

The instruction does talk about replacing myaccount and popreceipt, but not messageid. Now it is obvious, but took to long.

lucasmaj avatar Sep 14 '23 03:09 lucasmaj

Just tell me where the page source is. I will create the PR

panfilenok-epam avatar Sep 19 '23 10:09 panfilenok-epam