Skip to content

Graceful 404/400 handling for optional entities in web extension#1481

Merged
amitjoshi438 merged 3 commits intomainfrom
users/amitjoshi/graceful-404-optional-entities
Feb 18, 2026
Merged

Graceful 404/400 handling for optional entities in web extension#1481
amitjoshi438 merged 3 commits intomainfrom
users/amitjoshi/graceful-404-optional-entities

Conversation

@amitjoshi438
Copy link
Contributor

@amitjoshi438 amitjoshi438 commented Feb 16, 2026

Summary

  • Handle 400/404 responses gracefully for optional entities (blogs, blogposts, ideas, ideaforums, forumannouncements, forumposts) in fetchFromDataverseAndCreateFiles
  • Sites without these entities provisioned now log info telemetry (WebExtensionOptionalEntityNotFound) instead of throwing system errors with "{}"

Changes

  • webExtensionTelemetryEvents.ts: Added WEB_EXTENSION_OPTIONAL_ENTITY_NOT_FOUND telemetry event
  • remoteFetchProvider.ts: Added 400/404 check for conditionalFolderEntities before the generic !response.ok throw, using break to exit the fetch loop gracefully
  • remoteFetchProvider.test.ts: Added 3 integration tests (404 on optional entity, 400 on optional entity, 404 on core entity still errors)
  • CHANGELOG.md: Updated version to 2.0.132

Test plan

  • 404 response for blog entity handled gracefully with info telemetry
  • 400 response for blog entity handled gracefully with info telemetry
  • 404 response for core entity (webpages) still triggers error path
  • Web integration tests pass (npm run test-web-integration)

🤖 Generated with Claude Code

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>
@amitjoshi438 amitjoshi438 requested review from a team as code owners February 16, 2026 12:43
Amit Joshi and others added 2 commits February 16, 2026 18:18
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@amitjoshi438 amitjoshi438 enabled auto-merge (squash) February 16, 2026 13:14
@amitjoshi438 amitjoshi438 merged commit 4856806 into main Feb 18, 2026
8 checks passed
@amitjoshi438 amitjoshi438 deleted the users/amitjoshi/graceful-404-optional-entities branch February 18, 2026 08:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments