Problem
backend/src/lib/storage.ts — both downloadFile and getSignedUrl silently swallow all errors:
export async function downloadFile(key: string): Promise<ArrayBuffer | null> {
...
try { ... }
catch { return null; } // no logging
}
export async function getSignedUrl(...): Promise<string | null> {
...
try { ... }
catch { return null; } // no logging
}
When R2 is misconfigured or unreachable, callers receive null and return 404/503 to the client. There is no server-side log entry, making R2 outages completely invisible until users report them.
Fix
Add console.error("[storage] downloadFile failed", { key, error: err }) (and equivalent for getSignedUrl) in the catch blocks before returning null.
Problem
backend/src/lib/storage.ts— bothdownloadFileandgetSignedUrlsilently swallow all errors:When R2 is misconfigured or unreachable, callers receive
nulland return 404/503 to the client. There is no server-side log entry, making R2 outages completely invisible until users report them.Fix
Add
console.error("[storage] downloadFile failed", { key, error: err })(and equivalent forgetSignedUrl) in the catch blocks before returningnull.