Repository navigation
fix(webdav): log unmapped thumbnail errors at error level - #12663
Merged
2403905 merged 1 commit intoJul 28, 2026
Merged
Conversation
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
mzner
self-requested a review
July 28, 2026 07:30
mzner
previously approved these changes
Jul 28, 2026
deyankiteworks
previously approved these changes
Jul 28, 2026
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]>
kobergj
force-pushed
the
fix/webdav-thumbnail-error-logging
branch
from
July 28, 2026 08:01
691e626 to
a4382cb
Compare
mzner
self-requested a review
July 28, 2026 08:05
2403905
approved these changes
Jul 28, 2026
mzner
approved these changes
Jul 28, 2026
mklos-kw
approved these changes
Jul 28, 2026
kobergj
added a commit
to kobergj/ocis
that referenced
this pull request
Jul 28, 2026
…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)
This was referenced Jul 28, 2026
2403905
pushed a commit
that referenced
this pull request
Jul 28, 2026
…12668) 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>. (cherry picked from commit 6950f47) Co-authored-by: Claude Opus 5 <[email protected]>
2403905
pushed a commit
that referenced
this pull request
Jul 28, 2026
…12667) 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>. (cherry picked from commit 6950f47) Co-authored-by: Claude Opus 5 <[email protected]>
2403905
pushed a commit
that referenced
this pull request
Jul 28, 2026
…12666) 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>. (cherry picked from commit 6950f47) Co-authored-by: Claude Opus 5 <[email protected]>
kavitagautam
pushed a commit
to kavitagautam/ocis-fork
that referenced
this pull request
Jul 29, 2026
…2663) (owncloud#12668) 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>. (cherry picked from commit 6950f47) Co-authored-by: Claude Opus 5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
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, which made diagnosis rely on reverse-engineering the response body size.
Changes:
SpacesThumbnail,Thumbnail,PublicThumbnail,PublicThumbnailHead) now log the unmappeddefault:case at error level. Expected per-file outcomes (unsupported file type, file still processing, bad request, forbidden, rate limited) stay at debug level.ThumbnailandPublicThumbnaillogged viag.loginstead of the request-scoped logger, so their messages carried no request id. Both now uselogger.codesEnumonly mapped four status codes, so responses for every other code rendered an empty<s:exception></s:exception>. Added the missing entries for 403, 425 and 429, and unmapped codes now fall back to a generic exception name.500 is deliberately left unmapped and handled by the fallback, mirroring reva, which has
StatusInternalServerErrorcommented out of its ownsabreExceptionmap.Related Issue
N/A
Motivation and Context
A preview outage in a production instance returned ~1700 HTTP 500s per day for six days while every backend service logged nothing, because the only log statement on that path was at debug level. Raising the severity of infrastructure failures makes this class of outage visible without a log-level change.
How Has This Been Tested?
go build ./services/webdav/...andgo vet ./services/webdav/...cleango test ./services/webdav/pkg/service/v0/...passes, including a new table test fornewErrResponsecovering every mapped code and unmapped codes (the package previously had no test file)make -C services/webdav golangci-lintreports 50 pre-existingprotogetterfindings and times out both with and without these changes; verified by stashing that this PR introduces no new findingsTypes of changes
Checklist:
🤖 Generated with Claude Code