Describe the bug
When using CosmosSyncClient to execute a stored procedure, I'm receiving a null pointer exception from the SDK.
-
It looks like the conversion from the underlying asynchronous response to the synchronous response should be doing a null check on storedProcedure() but it isn't.
|
return new CosmosSyncStoredProcedureResponse(response, getStoredProcedure(response.storedProcedure().id())); |
-
CosmosStoredProcedureResponse clearly documents that storedProcedure() can be null:
|
* @return the stored procedure object or null |
Describe the bug
When using
CosmosSyncClientto execute a stored procedure, I'm receiving a null pointer exception from the SDK.It looks like the conversion from the underlying asynchronous response to the synchronous response should be doing a null check on
storedProcedure()but it isn't.azure-sdk-for-java/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/sync/CosmosSyncScripts.java
Line 298 in a044649
CosmosStoredProcedureResponseclearly documents thatstoredProcedure()can benull:azure-sdk-for-java/sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/CosmosStoredProcedureResponse.java
Line 37 in a044649