Merge pull request #1710 from PR0M3TH3AN/codex/expand-logging-in-catch-block

Add R2 CORS failure context logging
This commit is contained in:
thePR0M3TH3AN authored and GitHub committed 2026-01-25 22:00:44 -05:00
commit 87c494c1f3
1 file changed
+11
+11
View File
@@ -491,10 +491,21 @@ class R2Service {
});
}
} catch (corsErr) {
const resolvedEndpoint =
settings.endpoint ||
(accountId ? `https://${accountId}.r2.cloudflarestorage.com` : "");
const corsContext = {
bucketName,
endpoint: resolvedEndpoint,
region: settings.region || "",
corsOrigins,
};
userLogger.warn(
"Failed to ensure R2 bucket/CORS configuration via access keys. Ensure the bucket exists and you have permissions.",
corsContext,
corsErr
);
devLogger.warn("R2 bucket/CORS configuration details.", corsContext, corsErr);
}
}