Skip to content

Commit 776861f

Browse files
authored
Merge pull request #1768 from kfircs/patch-1
adding failing response example in batch
2 parents 68e4514 + 0881afc commit 776861f

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

docs/upgrade-to-v5.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,15 @@ var usersResponse = await batchResponseContent.GetResponseByIdAsync<UserCollecti
316316
List<User> userList = usersResponse.Value;
317317

318318
```
319+
Find failing responses
320+
```cs
321+
var responses = await result.GetResponsesAsync();
322+
//all the responses are successfull?
323+
var allReponsesSuccessFull = responses.Any( response => !response.Value.IsSuccessStatusCode);
324+
//the responses which do not have a success code.
325+
var failedResponses = responses.Where(response => !response.Value.IsSuccessStatusCode);
326+
```
327+
319328

320329
### Support for $count in request builders
321330

0 commit comments

Comments
 (0)