Skip to content

Conversation

@LukasHirt
Copy link
Collaborator

Description

Skip loading file content if getting the file info fails. This prevents an unexpected error when opening a file.

Motivation and Context

Handle exceptions with user friendly messages.

How Has This Been Tested?

  • test environment: macos, chrome
  • test case 1: open a .docx file and manually change the ID in the URL

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests
  • Documentation
  • Maintenance (e.g. dependency updates or tooling)

@LukasHirt LukasHirt requested review from Copilot and mzner November 6, 2025 10:44
@LukasHirt LukasHirt self-assigned this Nov 6, 2025
Copy link

Copilot AI left a comment

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 adds a guard condition to prevent loading file content when the resource information is unavailable, addressing an error that could occur when opening a file if the initial file info retrieval fails.

  • Adds a null check for the resource variable at the beginning of loadFileTask

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
packages/web-pkg/src/components/AppTemplates/AppWrapper.vue Added guard condition to skip file loading when resource is undefined
changelog/unreleased/bugfix-handle-file-loading-error.md Added changelog entry documenting the bugfix

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Skip loading file content if getting the file info fails.
This prevents an unexpected error when opening a file.
@LukasHirt LukasHirt force-pushed the fix/wrapper-file-loading branch from ca54da3 to c93ae78 Compare November 6, 2025 10:56
@LukasHirt LukasHirt changed the title fix: [OCISDEV-482] handle file info loading error fix(web-pkg): [OCISDEV-482] handle file info loading error Nov 6, 2025
@sonarqubecloud
Copy link

sonarqubecloud bot commented Nov 6, 2025

@LukasHirt LukasHirt enabled auto-merge November 6, 2025 12:34
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.

2 participants