azure-docs icon indicating copy to clipboard operation
azure-docs copied to clipboard

Azure graph configure plan request getting 502 bad gateway rejection with no rawError message

Open levdavid opened this issue 2 years ago • 4 comments

Azure documentation issue guidance

Thanks for opening an issue in the Azure technical documentation repository.

We use GitHub issues as the primary channel for customer and community feedback about the Azure documentation.

Creating an issue

Hello, There seems to be a either a bug in the Azure API or at least it is not properly documented here: https://github.com/MicrosoftDocs/azure-docs/blob/main/articles/marketplace/product-ingestion-api.md#configuration-requests

While I was able to send the request over to Azure from Postman, sending it from my Java backend is resulting in a 502 bad gateway error. Having added the CORS-resolving headers did not seem to help and I do not get the error when sending a Get request to the same API.


Document Details

Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

levdavid avatar Jan 23 '23 18:01 levdavid

@levdavid

It would be great if you could add a link to the documentation you are following for these steps? This would help us redirect the issue to the appropriate team. Thanks!!

Sadly there is no documentation azure teams have provided. The only mention of the endpoint on the site is here. There is no mentioning of the SDK nor are there any examples of how to use it.

After lurking around github, I have found the SDK repo with what was probably the closest one could get to the docs.

After looking at the scarce unit tests on custom calls, what happened is that SDK expects one to send a GSON.JsonObject instance instead of a JSON string or a jackson-serializable object (as shown here). 502 is returned by Azure API whenever the request does not pass its internal verification (i.e. the request body is not serializable by GSON or is not an instance of Gson.JsonObject).

If you send a json string, the error code has no error message alongside.

There is not a single place in the API documentation that says that this is a requirement.

levdavid avatar Jan 24 '23 05:01 levdavid

@levdavid Thanks for your feedback.

Assigning to content author @iqshahmicrosoft for review.

SwathiDhanwada-MSFT avatar Jan 27 '23 14:01 SwathiDhanwada-MSFT

#reassign:varsha-sarah

iqshahmicrosoft avatar Feb 14 '23 20:02 iqshahmicrosoft

Hi @levdavid, thank you for reaching out. I've looked into this issue, and my understanding is that the MS Graph article (https://learn.microsoft.com/en-us/graph/sdks/sdks-overview) requires an update. We have informed the MS Graph team regarding this issue and are tracking it internally. We also noticed that the Product Ingestion API article needs an update to provide clarity on authorization. This update to the article will be rolled out shortly. Please feel free to reach out to me on [email protected] if you have additional feedback regarding the Product Ingestion API. Thank you once again.

varsha-sarah avatar Apr 07 '23 16:04 varsha-sarah

#please-close

varsha-sarah avatar Apr 10 '23 19:04 varsha-sarah