Skip to content

A network error while loading a file shows a raw JavaScript error #4163

Closed

Description

@AlexAndBear

Initial Checklist

  • I understand this is a bug report and questions should be posted in the Community Discussions
  • I searched issues and couldn’t find anything (or linked relevant results below)

Bug Description

When loading a file fails with a network error, the app shows the raw JS error Cannot read properties of undefined (reading 'status') instead of a network error. getFileContents (and DAV.request) read error.response.status when there is no response.

Reproduction Steps

  1. Open a text file in the text editor once, then go back to the file list
  2. Make the GET of the file content fail with a network error (e.g. DevTools offline for that request)
  3. Open the file again

Expected Outcome

A clear network error message.

Actual Outcome

Cannot read properties of undefined (reading 'status').

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions