Closed ilmax closed 1 year ago
Thank you for your feedback. Tagging and routing to the team member best able to assist.
Hi @ilmax , Thank you for using Azure SDK for .NET. The issue has been fixed in the latest package. Please take a look.
Hi @HarveyLink, In which package has this been fixed? I'm using 1.1.0-beta.1 and am still experiencing the same exception.
Library name and version
Azure.ResourceManager.ApiManagement 1.0.1
Describe the bug
There's a bug in the deserialization code of the SDK whereas the api returns a 200 response that looks like this:
and the library throws this exception: An exception of type 'System.UriFormatException' occurred in System.Private.CoreLib.dll but was not handled in user code Invalid URI: The URI is empty
Stack Trace:
Expected behavior
The call should succeed
Actual behavior
The call throws exception
Reproduction Steps
1: Create an apim service 2: Create an api without a backed service 3: use the SDK to get the api
Here's the wrong check: https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiData.Serialization.cs#L336-L344 The code looks for a null string but the api call returns an empty string.
Environment
No response