fix(ocr): log warning when user ID resolution fails

The resolveUserId() catch block was silently swallowing exceptions,
making auth failures invisible in logs.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Marcel
2026-04-13 12:27:39 +02:00
parent 9282e46a02
commit 5a97316940

View File

@@ -81,6 +81,7 @@ public class OcrController {
AppUser user = userService.findByUsername(authentication.getName());
return user != null ? user.getId() : null;
} catch (Exception e) {
log.warn("Failed to resolve user ID for authentication: {}", authentication.getName(), e);
return null;
}
}