Skip to content

Changes failed Graph batch response to 200 OK. Closes #1358 - #1359

Merged
waldekmastykarz merged 2 commits into
dotnet:mainfrom
waldekmastykarz:fix-graphrandomerror-424
Aug 13, 2025
Merged

waldekmastykarz merged 2 commits into
dotnet:mainfrom
waldekmastykarz:fix-graphrandomerror-424

Conversation

@waldekmastykarz

Copy link
Copy Markdown
Collaborator

Changes failed Graph batch response to 200 OK. Closes #1358

Copilot AI review requested due to automatic review settings August 12, 2025 05:46
@waldekmastykarz
waldekmastykarz requested a review from a team as a code owner August 12, 2025 05:46
@waldekmastykarz waldekmastykarz added the pr-bugfix Fixes a bug label Aug 12, 2025

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the Graph batch error handling in the GraphRandomErrorPlugin to follow Microsoft Graph API batch request specifications. The changes ensure that failed batch responses return HTTP 200 OK status codes while individual batch items can still contain error information, and adds support for dependency-aware error handling.

Key changes:

  • Updates failed batch responses to return HTTP 200 OK instead of HTTP 424 Failed Dependency
  • Adds support for the DependsOn property in batch request payloads
  • Implements logic to use FailedDependency status for requests with dependencies

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
DevProxy.Plugins/Behavior/GraphRandomErrorPlugin.cs Updates batch error handling logic to return 200 OK for failed batches and adds dependency-aware error status selection
DevProxy.Abstractions/Models/GraphBatchRequestPayload.cs Adds DependsOn property to support Graph batch request dependencies

Comment thread DevProxy.Abstractions/Models/GraphBatchRequestPayload.cs
@waldekmastykarz
waldekmastykarz merged commit 1963b65 into dotnet:main Aug 13, 2025
4 checks passed
@waldekmastykarz
waldekmastykarz deleted the fix-graphrandomerror-424 branch August 13, 2025 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-bugfix Fixes a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG]: GraphRandomErrorPlugin returns HTTP status code 424 instead of 200 for batches with failed requests

3 participants