File tree 1 file changed +12
-8
lines changed
Microsoft.Azure.Cosmos/src/Query/Core
1 file changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -86,14 +86,18 @@ private static bool TryCreateFromExceptionWithStackTrace(
86
86
return false ;
87
87
}
88
88
89
- cosmosException = CosmosExceptionFactory . Create (
90
- cosmosException . StatusCode ,
91
- cosmosException . Message ,
92
- exceptionWithStackTrace . StackTrace ,
93
- headers : cosmosException . Headers ,
94
- cosmosException . Trace ,
95
- cosmosException . Error ,
96
- cosmosException . InnerException ) ;
89
+ if ( innerException is not CosmosException && innerException is not Documents . DocumentClientException )
90
+ {
91
+ cosmosException = CosmosExceptionFactory . Create (
92
+ cosmosException . StatusCode ,
93
+ cosmosException . Message ,
94
+ exceptionWithStackTrace . StackTrace ,
95
+ headers : cosmosException . Headers ,
96
+ cosmosException . Trace ,
97
+ cosmosException . Error ,
98
+ cosmosException . InnerException ) ;
99
+ }
100
+
97
101
return true ;
98
102
}
99
103
You can’t perform that action at this time.
0 commit comments