Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Aug 13, 2025

This PR addresses a documentation gap by adding comprehensive error handling information to the StoreContext.GetAppAndOptionalStorePackageUpdatesAsync method. Previously, developers encountering errors like "Object server is stopping when OLE service contacts it" had no guidance on whether these were bugs or expected exceptions that should be handled.

Changes Made

Added Exceptions Section

  • COMException documentation: Following the pattern of similar Store APIs, documented the common ERROR_INVALID_WINDOW_HANDLE error for UI thread requirements
  • System.Exception documentation: Added comprehensive coverage of Store service-related errors, specifically addressing the "Object server is stopping when OLE service contacts it" error mentioned in the issue

Enhanced Remarks Section

  • Prerequisites and Environment Requirements: Added clear documentation of what must be installed and configured for the method to work (Store app, services, network connectivity)
  • Assigned Access Mode Compatibility: Addressed the specific question about kiosk mode usage with detailed considerations
  • Error Handling Recommendations: Provided a practical C# code example showing proper try/catch implementation

Example Error Handling

The documentation now includes this practical guidance:

try
{
    var updates = await storeContext.GetAppAndOptionalStorePackageUpdatesAsync();
    // Process updates
}
catch (System.Runtime.InteropServices.COMException ex)
{
    // Handle COM-related errors (e.g., threading issues)
}
catch (System.Exception ex)
{
    // Handle Store service errors (e.g., service unavailable)
    // Log the error and implement appropriate retry logic
}

The changes follow the exact documentation patterns used by similar Store API methods like RequestDownloadStorePackageUpdatesAsync and RequestPurchaseAsync, ensuring consistency across the Windows Store API documentation.

Fixes #1060.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@prmerger-automator prmerger-automator bot added the do-not-merge PR is being processed and awaiting review/approval. label Aug 13, 2025
…orePackageUpdatesAsync

Co-authored-by: GrantMeStrength <[email protected]>
@Copilot Copilot AI changed the title [WIP] Error Handling Add comprehensive error handling documentation to GetAppAndOptionalStorePackageUpdatesAsync Aug 13, 2025
@Copilot Copilot AI requested a review from GrantMeStrength August 13, 2025 16:44
Copilot finished work on behalf of GrantMeStrength August 13, 2025 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge PR is being processed and awaiting review/approval. review-team-triage
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error Handling
2 participants