Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
public async releaseLease(options: LeaseOperationOptions = {}): Promise {
const { span, spanOptions } = createSpan(
"BlobLeaseClient-releaseLease",
options.tracingOptions
);
try {
return await this._containerOrBlobOperation.releaseLease(this._leaseId, {
abortSignal: options.abortSignal,
modifiedAccessConditions: options.conditions,
spanOptions
});
} catch (e) {
span.setStatus({
code: CanonicalCode.UNKNOWN,
message: e.message
});
throw e;
} finally {
span.end();
}
}
"Content-Type": "application/x-www-form-urlencoded"
},
abortSignal: options && options.abortSignal,
spanOptions: newOptions.spanOptions
});
tokenResponse = await this.identityClient.sendTokenRequest(webResource);
}
this.lastTokenResponse = tokenResponse;
return (tokenResponse && tokenResponse.accessToken) || null;
} catch (err) {
const code =
err.name === AuthenticationErrorName
? CanonicalCode.UNAUTHENTICATED
: CanonicalCode.UNKNOWN;
span.setStatus({
code,
message: err.message
});
throw err;
} finally {
span.end();
}
}
}