Commit 9b4627f
authored
Update Invoke-CosmosDbReqiest to throw a CosmosDB.ResponseExeption instead of a HttpReponseException (#501)
* Refactor exception handling and enhance integration tests for Cosmos DB operations
* Fix typo in ResponseException class name and update related test case
* Add New-CosmosDbResponseException function and enhance ResponseException handling
* Refactor tests for New-CosmosDbResponseException to use consistent variable naming and improve clarity
* Refactor HttpResponseException tests for clarity and improve handling in PowerShell 7 environment
* Refactor HttpResponseException tests to use script-scoped variables for improved clarity and consistency
* Refactor test variable declarations for improved clarity and consistency
* Refactor HttpResponseException tests for PowerShell 7 compatibility and improved clarity
* Enhance build configuration by adding code coverage merging and updating coverage output settings
* Update CHANGELOG and refactor exception handling in CosmosDB module
- Document breaking change: Exceptions returned by Invoke-CosmosDbRequest are now CosmosDb.ResponseException objects.
- Implement New-CosmosDbResponseException to handle exceptions more effectively.
- Enhance integration tests to validate CosmosDb.ResponseException behavior for non-existent collections and documents.
- Refactor unit tests to ensure proper handling of unsupported exception types.
* Refactor New-CosmosDbResponseException to correctly assign status codes and update integration tests for improved accuracy
* Update CHANGELOG and refactor CosmosDb.ResponseException handling to remove status code assignment and improve integration tests for clarity
* Add verbose logging for CosmosDb.ResponseException handling in integration tests
* Add verbose logging for CosmosDb.ResponseException handling in integration tests
* Add verbose logging for exception handling in New-CosmosDbResponseException
* Remove maxParallel setting from Unit and Integration Test Matrix jobs in azure-pipelines.yml
* Improve message handling in New-CosmosDbResponseException and enhance verbose logging in integration tests
* Refactor Cosmos DB response exception handling to differentiate error messages based on PowerShell edition1 parent d95eea9 commit 9b4627f
File tree
10 files changed
+423
-61
lines changed- source
- Private/utils
- classes/CosmosDB
- en-US
- tests
- Integration
- Unit
10 files changed
+423
-61
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
10 | 20 | | |
11 | 21 | | |
12 | 22 | | |
13 | 23 | | |
14 | 24 | | |
15 | | - | |
16 | | - | |
17 | 25 | | |
18 | 26 | | |
19 | 27 | | |
| 28 | + | |
| 29 | + | |
20 | 30 | | |
21 | 31 | | |
22 | 32 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
71 | 70 | | |
72 | 71 | | |
73 | 72 | | |
74 | | - | |
75 | 73 | | |
76 | 74 | | |
77 | 75 | | |
78 | 76 | | |
79 | | - | |
80 | 77 | | |
81 | 78 | | |
82 | 79 | | |
83 | 80 | | |
84 | | - | |
85 | 81 | | |
86 | 82 | | |
87 | 83 | | |
88 | 84 | | |
89 | | - | |
90 | 85 | | |
91 | 86 | | |
92 | 87 | | |
93 | 88 | | |
94 | | - | |
95 | 89 | | |
96 | 90 | | |
97 | 91 | | |
98 | 92 | | |
99 | | - | |
100 | 93 | | |
101 | 94 | | |
102 | 95 | | |
103 | 96 | | |
104 | | - | |
105 | 97 | | |
106 | 98 | | |
107 | 99 | | |
108 | 100 | | |
109 | | - | |
110 | 101 | | |
111 | 102 | | |
112 | 103 | | |
113 | 104 | | |
114 | | - | |
115 | 105 | | |
116 | 106 | | |
117 | 107 | | |
118 | 108 | | |
119 | | - | |
120 | 109 | | |
121 | 110 | | |
122 | 111 | | |
123 | 112 | | |
124 | | - | |
125 | 113 | | |
126 | 114 | | |
127 | 115 | | |
128 | 116 | | |
129 | | - | |
130 | 117 | | |
131 | 118 | | |
132 | 119 | | |
| |||
152 | 139 | | |
153 | 140 | | |
154 | 141 | | |
155 | | - | |
| 142 | + | |
156 | 143 | | |
157 | 144 | | |
158 | 145 | | |
| |||
175 | 162 | | |
176 | 163 | | |
177 | 164 | | |
178 | | - | |
179 | 165 | | |
180 | 166 | | |
181 | 167 | | |
182 | | - | |
183 | 168 | | |
184 | 169 | | |
185 | 170 | | |
186 | 171 | | |
187 | | - | |
188 | 172 | | |
189 | 173 | | |
190 | 174 | | |
191 | 175 | | |
192 | | - | |
193 | 176 | | |
194 | 177 | | |
195 | 178 | | |
196 | 179 | | |
197 | | - | |
198 | 180 | | |
199 | 181 | | |
200 | 182 | | |
201 | 183 | | |
202 | | - | |
203 | 184 | | |
204 | 185 | | |
205 | 186 | | |
206 | 187 | | |
207 | | - | |
208 | 188 | | |
209 | 189 | | |
210 | 190 | | |
211 | 191 | | |
212 | | - | |
213 | 192 | | |
214 | 193 | | |
215 | 194 | | |
216 | 195 | | |
217 | | - | |
218 | 196 | | |
219 | 197 | | |
220 | 198 | | |
221 | 199 | | |
222 | | - | |
223 | 200 | | |
224 | 201 | | |
225 | 202 | | |
226 | 203 | | |
227 | | - | |
228 | 204 | | |
229 | 205 | | |
230 | 206 | | |
231 | 207 | | |
232 | | - | |
233 | 208 | | |
234 | 209 | | |
235 | 210 | | |
236 | 211 | | |
237 | | - | |
238 | 212 | | |
239 | 213 | | |
240 | 214 | | |
| |||
259 | 233 | | |
260 | 234 | | |
261 | 235 | | |
262 | | - | |
| 236 | + | |
263 | 237 | | |
264 | 238 | | |
265 | 239 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
83 | 86 | | |
84 | 87 | | |
85 | 88 | | |
| |||
115 | 118 | | |
116 | 119 | | |
117 | 120 | | |
118 | | - | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
119 | 133 | | |
120 | 134 | | |
121 | 135 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
251 | 251 | | |
252 | 252 | | |
253 | 253 | | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
254 | 259 | | |
255 | 260 | | |
256 | 261 | | |
| |||
289 | 294 | | |
290 | 295 | | |
291 | 296 | | |
292 | | - | |
293 | | - | |
294 | | - | |
295 | | - | |
296 | | - | |
297 | 297 | | |
298 | 298 | | |
299 | 299 | | |
| |||
305 | 305 | | |
306 | 306 | | |
307 | 307 | | |
308 | | - | |
| 308 | + | |
309 | 309 | | |
| 310 | + | |
310 | 311 | | |
311 | 312 | | |
312 | 313 | | |
313 | 314 | | |
314 | 315 | | |
315 | | - | |
| 316 | + | |
316 | 317 | | |
317 | 318 | | |
318 | 319 | | |
| |||
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
31 | | - | |
| 30 | + | |
| 31 | + | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
0 commit comments