Skip to content

[QUERY] Azure SDK for Java: Should Key Vault Client swallow exceptions? #36247

Open
@mattsmall1972

Description

@mattsmall1972

Query/Question
When the Java Key Vault client fails while sending a HTTP request, it captures the exception, writes a log about the failure, and continues execution. Is it proper design to swallow the exception without giving the calling code ability to handle the exception?

 try (CloseableHttpClient client = buildClient()) {
            HttpGet httpGet = new HttpGet(url);
            if (headers != null) {
                headers.forEach(httpGet::addHeader);
            }
            httpGet.addHeader(USER_AGENT_KEY, USER_AGENT_VALUE);
            result = client.execute(httpGet, createResponseHandler());
        } catch (IOException ioe) {
            LOGGER.log(WARNING, "Unable to finish the http get request.", ioe);
        }

Why is this not a Bug or a feature Request?
It is unclear if this is by-design or a bug.

Setup (please complete the following information if applicable):

  • Library/Libraries: Azure SDK for Java / Azure Key Vault

https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/keyvault/azure-security-keyvault-jca/src/main/java/com/azure/security/keyvault/jca/implementation/utils/HttpUtil.java#L62

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

  • [X ] Query Added
  • [X ] Setup information Added

Metadata

Metadata

Assignees

Labels

ClientThis issue points to a problem in the data-plane of the library.KeyVaultazure-spring-jcacustomer-reportedIssues that are reported by GitHub users external to the Azure organization.feature-requestThis issue requires a new behavior in the product in order be resolved.needs-team-attentionWorkflow: This issue needs attention from Azure service team or SDK team

Type

No type

Projects

Status

Todo

Status

Not Started

Relationships

None yet

Development

No branches or pull requests

Issue actions