Skip to content

fix(webdav): log unmapped thumbnail errors at error level (#12663) - #12667

Merged
2403905 merged 1 commit into
owncloud:stable-8.2from
kobergj:backport/stable-8.2/webdav-thumbnail-error-logging
Jul 28, 2026
Merged

2403905 merged 1 commit into
owncloud:stable-8.2from
kobergj:backport/stable-8.2/webdav-thumbnail-error-logging

Conversation

@kobergj

@kobergj kobergj commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Forward port of #12663 to stable-8.2. Companion to #12666 (stable-8.1).

Failures of the thumbnails service were logged at debug level only, so errors which are not a property of the requested file — such as the thumbnails service being unreachable — were invisible at production log levels. A complete preview outage produced HTTP 500 responses without a single log line explaining them.

Unmapped errors are now logged at error level, while expected per-file outcomes such as an unsupported file type or a file still being processed stay at debug level. Thumbnail and PublicThumbnail previously logged at error level for every failure, including expected 404s for unsupported file types, and did so via g.log so the message carried no request id — both now log only in the default: branch, using the request-scoped logger.

Also adds the missing codesEnum entries for 403, 425 and 429 and falls back to a generic exception name for any remaining unmapped status code, so error responses no longer render an empty <s:exception></s:exception>.

Conflict resolution: the cherry-pick needed manual resolution because this branch already renders the sanitized message errInternalError("could not get thumbnail") instead of err.Error(). That line is context directly below the insertion point, so git could not place the hunk. This branch's sanitized message is kept unchanged; the added and removed lines are byte-identical to #12666.

🤖 Generated with Claude Code

…2663)

Failures of the thumbnails service were logged at debug level only, so
errors which are not a property of the requested file — such as the
thumbnails service being unreachable — were invisible at production log
levels. A complete preview outage produced HTTP 500 responses without a
single log line explaining them.

Unmapped errors are now logged at error level, while expected per-file
outcomes such as an unsupported file type or a file still being processed
stay at debug level. Two of the four thumbnail handlers also logged
without the request context, so their messages carried no request id.

Also add the missing codesEnum entries for 403, 425 and 429 and fall back
to a generic exception name for any remaining unmapped status code, so
error responses no longer render an empty <s:exception></s:exception>.

Co-authored-by: Claude Opus 5 <[email protected]>
(cherry picked from commit 6950f47)
@kobergj
kobergj requested a review from a team as a code owner July 28, 2026 13:54
@kw-security

kw-security commented Jul 28, 2026 •

Copy link
Copy Markdown

✅ Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
✅ Open Source Security 0 0 0 0 0 issues
✅ Licenses 0 0 0 0 0 issues
✅ Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@mzner
mzner self-requested a review July 28, 2026 13:59
@2403905
2403905 merged commit bae5daf into owncloud:stable-8.2 Jul 28, 2026
125 of 127 checks passed
@kobergj
kobergj deleted the backport/stable-8.2/webdav-thumbnail-error-logging branch July 29, 2026 07:14
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.

5 participants