Fix recurring desktop extension errors affecting error diagnostics#1482
Merged
amitjoshi438 merged 5 commits intomainfrom Feb 18, 2026
Merged
Fix recurring desktop extension errors affecting error diagnostics#1482amitjoshi438 merged 5 commits intomainfrom
amitjoshi438 merged 5 commits intomainfrom
Conversation
Sites without blogs, forums, or ideas provisioned return HTTP 400/404
from Dataverse when fetching these optional entity types. Previously
these were thrown and caught as system errors with message "{}",
producing ~5.4 false errors per session and degrading the read
completion rate from 97% to 77%.
Now, 400/404 responses for conditionalFolderEntities (blogs, blogposts,
ideas, ideaforums, forumannouncements, forumposts) are handled
gracefully with info telemetry instead of error telemetry.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Improve error handling across 5 high-impact areas identified via telemetry (184K errors/30 days): expand binary file exclusion to prevent validation errors on non-text files, add cooldown to auth session change handler to break retry loops, add phase tracking to PreviewSite initialization, include HTTP status in ECS config errors, and standardize WebsiteUtil fetch error handling with safe JSON parsing and consistent 404 tolerance. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR addresses five categories of recurring desktop extension errors affecting error diagnostics by improving error handling, adding tolerance for optional entities, implementing retry loop prevention, and enhancing telemetry reporting.
Changes:
- Expanded binary file exclusions to prevent ValidateTextDocumentEvent errors on 26 additional binary file types (fonts, executables, archives, etc.)
- Added 5-second cooldown to authentication session change handler to prevent tight retry loops
- Enhanced error diagnostics with initPhase tracking in PreviewSite initialization and improved error message details in ECS config fetching
- Implemented graceful 404/400 handling for optional community entities (blogs, forums, ideas, etc.) with dedicated telemetry
- Standardized error handling across WebsiteUtil with safeResponseJson helper and safe error type checking
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| src/web/client/test/integration/remoteFetchProvider.test.ts | Added 3 tests for optional entity 404/400 handling and core entity 404 behavior |
| src/web/client/dal/remoteFetchProvider.ts | Added graceful 404/400 handling for optional entities with info telemetry instead of errors |
| src/common/utilities/WebsiteUtil.ts | Replaced unsafe as Error casts with instanceof Error checks, added safeResponseJson helper, and implemented 404 tolerance for app modules and site settings |
| src/common/ecs-features/ecsFeatureClient.ts | Enhanced error messages with HTTP status, added JSON parse error handling, validated config presence, and included clientName in error telemetry |
| src/common/OneDSLoggerTelemetry/web/client/webExtensionTelemetryEvents.ts | Added WEB_EXTENSION_OPTIONAL_ENTITY_NOT_FOUND telemetry event |
| src/client/test/Integration/power-pages/preview-site/PreviewSite.test.ts | Added 3 tests for initPhase tracking in error telemetry |
| src/client/test/Integration/ecsFeatureClient.test.ts | New test file with 6 comprehensive tests for ECS client error scenarios |
| src/client/test/Integration/WebsiteUtil.test.ts | Added 3 tests for 404 handling and JSON parse failures |
| src/client/power-pages/preview-site/PreviewSite.ts | Added initPhase variable for granular error tracking and replaced unsafe error cast |
| src/client/power-pages/commonUtility.ts | Expanded EXCLUDED_BINARY_EXTENSIONS constant from 5 to 26 file types |
| src/client/extension.ts | Added 5-second cooldown mechanism for authentication session change handler |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
priyanshu92
approved these changes
Feb 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
getExcludedFileGlobPattern()to exclude 26 additional binary extensions (.dll,.exe,.zip, fonts, etc.) that were causingValidateTextDocumentEventerrors (21K errors, 78 users)onDidChangeSessionshandler to break tight retry loops where failed auth triggers another session change (116K errors, 55 users)initPhasevariable toPreviewSite.initialize()so error telemetry identifies which step failed; replaced unsafeas Errorcast withinstanceof Errorcheck (16K errors, 5K users)response.json()in try-catch, validatedresult[clientName]before assignment (5K errors, 707 users)safeResponseJson()helper, standardized 404 tolerance across all 4 fetch functions, fixed error messages to log actual error instead of event name constant (7K errors, 163-368 users)Test plan
npm run compile-webpassesnpm run test— 95 unit tests passingnpm run test-desktop-int— 842 integration tests passing (including 12 new tests)🤖 Generated with Claude Code