MicrosoftDocs / feedback

📢 docs.microsoft.com site feedback
https://learn.microsoft.com
Creative Commons Attribution 4.0 International
239 stars 160 forks source link

Azure Storage Queue Documentation incorrect #2842

Open spartymants opened 4 years ago

spartymants commented 4 years ago

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.

welcome[bot] commented 4 years ago

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).

spartymants commented 4 years ago

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

guillene commented 3 years ago

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

yehudaQ commented 3 years ago

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

guillene commented 3 years ago

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 😄

yehudaQ commented 3 years ago

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

Nzglobal commented 2 years ago

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
lucasmaj commented 1 year ago

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.

panfilenok-epam commented 1 year ago

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