Skip to content

fix: handle unreadable appdata cache without error - #6196

Open
elzody wants to merge 1 commit into
mainfrom
fix/cached-request-unreadable-appdata
Open

elzody wants to merge 1 commit into
mainfrom
fix/cached-request-unreadable-appdata

Conversation

@elzody

@elzody elzody commented Oct 14, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes #6174

If something cached in appdata like discovery XML is unreadable, it causes a 500 Internal Server Error on the instance, but ideally we want to prevent that and handle it accordingly.

@elzody elzody self-assigned this Oct 14, 2026
@elzody elzody added the 3. to review Ready to be reviewed label Oct 14, 2026
@elzody
elzody marked this pull request as ready for review October 14, 2026 21:47
@elzody
elzody requested a review from juliusknorr as a code owner October 14, 2026 21:47
return $value;
}
} catch (\Throwable $e) {
$this->logger->warning('Could not read cached remote data for ' . $this->cacheKey, ['exception' => $e]);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking about writing null to the cache here to prevent this triggering over and over again, but think this would then prevent quick recovery if the file is written again.

May be worth to double check but not a blocker from my POV.

@elzody elzody Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's probably better to just keep it as the last state of the file, rather than delete it or write null to it

@juliusknorr juliusknorr added the bug Something isn't working label Oct 15, 2026
@elzody
elzody force-pushed the fix/cached-request-unreadable-appdata branch from a62e912 to d7fc7d8 Compare October 20, 2026 00:01
Assisted-by: ClaudeCode:claude-opus-5
Signed-off-by: Elizabeth Danzberger <elizabeth@elzody.dev>
@elzody
elzody force-pushed the fix/cached-request-unreadable-appdata branch from d7fc7d8 to f6114ab Compare October 20, 2026 00:03

This branch has not been deployed

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

Labels

3. to review Ready to be reviewed bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enabling richdocuments causes internal server error in Nextcloud Server

2 participants