fix: harden deploy error handling - guard against undefined errors, safeErrorMessage null check
- deploy.js: wrap logError/notification in try/catch so they never mask the original deploy error - deploy.js: use optional chaining for error.message access - logging.js: safeErrorMessage handles null/undefined error gracefully
This commit is contained in:
@@ -94,6 +94,7 @@ async function logError(ERROR_LOG_FILE, MAX_ERROR_LOG_SIZE, context, error, addi
|
||||
* Return a safe error message without leaking internals
|
||||
*/
|
||||
function safeErrorMessage(error) {
|
||||
if (!error) return 'An internal error occurred';
|
||||
const msg = error.message || String(error);
|
||||
|
||||
// Detect port conflict errors
|
||||
|
||||
Reference in New Issue
Block a user