File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -34,21 +34,23 @@ module Operations =
3434
3535 let internal unwrapCosmosException ( ex : Exception ) =
3636 match ex with
37- | :? CosmosException as ex -> Some ex
37+ | :? CosmosException as ex -> ValueSome ex
3838 | :? AggregateException as ex ->
3939 match ex.InnerException with
40- | :? CosmosException as cex -> Some cex
41- | _ -> None
42- | _ -> None
40+ | :? CosmosException as cex -> ValueSome cex
41+ | _ -> ValueNone
42+ | _ -> ValueNone
4343
4444 let internal handleException ( ex : Exception ) =
4545 let cosmosException = unwrapCosmosException ex
4646 match cosmosException with
47- | Some ex when canHandleStatusCode ex.StatusCode -> Some ex
48- | _ -> None
47+ | ValueSome ex when canHandleStatusCode ex.StatusCode -> ValueSome ex
48+ | _ -> ValueNone
4949
50+ [<return : Struct>]
5051 let (| CosmosException | _ |) ( ex : Exception ) = unwrapCosmosException ex
5152
53+ [<return : Struct>]
5254 let (| HandleException | _ |) ( ex : Exception ) = handleException ex
5355
5456 let internal retryUpdate toErrorResult executeConcurrentlyAsync maxRetryCount currentAttemptCount ( e : CosmosException ) =
You can’t perform that action at this time.
0 commit comments