Closed Onokaev closed 1 year ago
@Onokaev thank you for reporting this issue.
This is happening because snippet generation bubbles up exception messages from the different parsing tools. One is using OData, the other is using OpenAPI, that's why you see different error messages. It would be impractical to have common error messages across all possible error messages using these two different stacks.
Maybe this particular case could be special cased in the code with an exception wrapper, but even this won't live that long because everything will eventually move to OpenAPI.
In addition, the error messages nearly mean the same thing.
cc: @maisarissi @sebastienlevert regarding estimated timeline for migration of all languages to the OpenAPI stack.
It will still take some time until we get all languages on the OpenAPI stack, even more when we think of PowerShell. Having multiple errors "meaning" the same is a little big weird, but not that much of a big deal I think. We should focus on the expected format from OpenAPI-described snippets and let the other format die peacefully...
Thank you @zengin and @sebastienlevert. Let me make changes to GE to cover these special cases. For context, we want to show users the exact errors that are coming from the snippets endpoint. Currently, we show 'Snippet not available' whenever a snippet call fails for any reason.
Describe the bug For the same query URL, for example: https://graph.microsoft.com/v1.0/mee (Notice that /mee is wrong), the API returns different errors and different error codes.
To Reproduce Steps to reproduce the behavior:
Expected behavior The snippets should return the same error for the same queryURL. If it's a 404, all should return that
Screenshots
Notice that the errors as well as the error codes are different
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context Add any other context about the problem here.