Azure / azure-sdk-for-net

This repository is for active development of the Azure SDK for .NET. For consumers of the SDK we recommend visiting our public developer docs at https://learn.microsoft.com/dotnet/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-net.
MIT License
5.56k stars 4.82k forks source link

[FEATURE REQ] Obfuscating ResponseError Details is breaking for consumers and unnecessary #47173

Closed pateljay-37 closed 1 week ago

pateljay-37 commented 1 week ago

Library name

Azure.Core 1.42.0.0

Please describe the feature.

As previously discussed in this issue https://github.com/Azure/azure-sdk-for-net/issues/38890, Details, Target, and InnerError are all internal properties on the AzureDeploymentOperation.Properties.StatusMessage.ResponseError class. I understand the expectation is for resource providers (RPs) to ensure all information needed to diagnose an error are in the top-level error code and message, but it's not possible to actually enforce that or guarantee it. My RP, Azure Batch, currently inspects the error Details to inform both our internal error handling and what we return back to our customers. Removing visibility to these Details is effectively a breaking change for us.

I understand that a workaround is to call ToString() and to inspect the Details from there, but given you're making the Details available there, why not just make them accessible on the ResponseError object directly? This obfuscation is unnecessary, and forces consumers to add new logic on their side to avoid the breaking change.

github-actions[bot] commented 1 week ago

Thank you for your feedback. Tagging and routing to the team member best able to assist.

jsquire commented 1 week ago

@pateljay-37: Please refer to the issue that you linked. Your scenario and request align with the one made there, and the discussion thread with rationale and the decision remain salient. I'm going to close this out, as there is no change to the outcome from the existing issue.