Skip to content

Conversation

@abraunegg
Copy link
Owner

This change fixes incorrect error handling when Microsoft Graph returns 204 No Content for successful PATCH operations.

Previously, the client always enforced JSON object validation for PATCH responses. When Graph legitimately returned 204 No Content (with an empty response body), the client incorrectly treated the operation as a failure, generated a OneDriveException, and entered a retry loop.

This update adjusts the response validation logic to correctly treat 204 No Content and empty response bodies as successful outcomes, while preserving strict JSON validation for responses that are expected to return JSON payloads.

This resolves scenarios where the client would continuously retry a successful Graph API call, resulting in repeated log messages such as:

Retrying the respective Microsoft Graph API call for Internal Thread ID

No behavioural change occurs for genuine error responses.

… Graph PATCH requests

This change fixes incorrect error handling when Microsoft Graph returns 204 No Content for successful PATCH operations.

Previously, the client always enforced JSON object validation for PATCH responses. When Graph legitimately returned 204 No Content (with an empty response body), the client incorrectly treated the operation as a failure, generated a OneDriveException, and entered a retry loop.

This update adjusts the response validation logic to correctly treat 204 No Content and empty response bodies as successful outcomes, while preserving strict JSON validation for responses that are expected to return JSON payloads.

This resolves scenarios where the client would continuously retry a successful Graph API call, resulting in repeated log messages such as:

Retrying the respective Microsoft Graph API call for Internal Thread ID

No behavioural change occurs for genuine error responses.
@abraunegg abraunegg added this to the v2.5.10 milestone Jan 25, 2026
* Clarify message based on feedback - this ensures the right message is being presented
* Ensure message changes when --verbose is used
* Update patch() and consumers of patch() to flag if the JSON response needs to be validated or not
* Update checking of response when a 204 generated
* Only save if the JSON response is a valid JSON object
@abraunegg abraunegg merged commit 87cb0cc into master Jan 30, 2026
10 checks passed
@abraunegg abraunegg deleted the fix-issue-3611 branch January 30, 2026 02:01
@abraunegg
Copy link
Owner Author

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Repository owner locked and limited conversation to collaborators Feb 6, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Retrying the respective Microsoft Graph API call for Internal Thread ID

1 participant