Closed bzumhagen closed 3 years ago
https://github.com/imranmomin/Hangfire.AzureCosmosDb/blob/1ed52d4ff05c34ba11654ca20c27786bd2c2ee13/src/CosmosDbConnection.cs#L90
The azure client throws exceptions for 404s, so if the intended behavior is to return null for a non-existent job, this should be caught.
Something like
catch (CosmosException e) when (e.StatusCode == HttpStatusCode.NotFound) { return null }
Yes - it is intended to return. I have added the try-catch to the call. Will soon release the fixes along with others
https://github.com/imranmomin/Hangfire.AzureCosmosDb/blob/1ed52d4ff05c34ba11654ca20c27786bd2c2ee13/src/CosmosDbConnection.cs#L90
The azure client throws exceptions for 404s, so if the intended behavior is to return null for a non-existent job, this should be caught.
Something like