firstsun-dev_git-files-sync/tests
Claude c474a7e6c4
fix(services): stop logging expected 404s as errors during refresh
Loading .gitignore files probes paths that often don't exist remotely.
getFile already treats 404 as "empty file" (handleFileNotFound) and the
gitignore lookup ignores failures, but safeRequest logged every 404 as an
error — twice, because its own catch re-caught the error it had just
thrown. This produced scary "Git Service Request Failed (404): Not Found"
console output during a normal pull/refresh.

Restructure safeRequest so the catch only wraps the network call (no
double-logging of HTTP-status errors), and log an expected 404 at debug
level instead of error. Non-404 statuses are still logged as errors and
all statuses still throw so callers can handle them.

Add a debug level to the logger and regression tests for 404 vs 500.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DwioG4CNKUBuKiZdowLFWe
2026-06-28 04:27:25 +00:00
..
logic fix(sync): fall back to adapter read for symlinked files 2026-06-26 06:28:25 +00:00
services fix(services): stop logging expected 404s as errors during refresh 2026-06-28 04:27:25 +00:00
ui refactor(ui): unify Sync Status icons via Lucide setIcon 2026-06-26 06:22:53 +00:00
utils refactor(test): eliminate duplicate code flagged by SonarCloud 2026-05-22 03:52:32 +00:00
setup.ts refactor(ui): unify Sync Status icons via Lucide setIcon 2026-06-26 06:22:53 +00:00