[BUG] If an exception occurs while sending an Azure storage request and it doesn't have a cause then the information in the exception gets dropped #43463
Labels
customer-reported
Issues that are reported by GitHub users external to the Azure organization.
needs-triage
Workflow: This is a new issue that needs to be triaged to the appropriate team.
question
The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Describe the bug
The error handling for the
sendRequest
method in theStorageImplUtils
assumes that the exception has a cause:azure-sdk-for-java/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/implementation/StorageImplUtils.java
Lines 499 to 512 in f36f0f5
RuntimeException
is thrown with a null causeException or Stack Trace
Just an empty
RuntimeException
that gets thrown without a cause fromStorageImplUtils#sendRequest
To Reproduce
Steps to reproduce the behavior: I don't believe these are needed
Code Snippet
Expected behavior
I expect that if an exception is caught in the
sendRequest
method and it doesn't have a cause that the same exception should be rethrown if it is either a runtime exception or an error.Information Checklist
Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report
The text was updated successfully, but these errors were encountered: