Add full S3 error dump for debugging

This commit is contained in:
Zac Gaetano 2026-04-07 00:34:46 -04:00
parent 89291a4baf
commit 4b0f56ac2a

View file

@ -469,7 +469,7 @@ app.post("/api/s3/test", requireAdmin, async (req, res) => {
else if (err.code === "ECONNREFUSED" || err.message?.includes("ECONNREFUSED")) friendly = "Connection refused — check endpoint URL and port";
else if (err.code === "ENOTFOUND" || err.message?.includes("ENOTFOUND")) friendly = "Endpoint not found — check the URL";
else if (err.message?.includes("TLS") || err.message?.includes("certificate")) friendly = "TLS/SSL error — endpoint certificate issue";
console.error("[S3 Test] Error:", err.message);
console.error("[S3 Test] Error:", err.message, "| name:", err.name, "| code:", err.Code || err.code, "| statusCode:", err.$metadata?.httpStatusCode, "| full:", JSON.stringify(err, Object.getOwnPropertyNames(err)));
res.status(400).json({ success: false, error: friendly });
}
});