mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-20 19:32:15 +00:00
fix(core): Ensure error.message is a string before checking for specific messages (#17417)
This commit is contained in:
@@ -161,7 +161,7 @@ export async function execute(
|
||||
returnData.push(newItem);
|
||||
} catch (error) {
|
||||
let errorDescription;
|
||||
if (error.message.includes('Unexpected token')) {
|
||||
if (typeof error.message === 'string' && error.message.includes('Unexpected token')) {
|
||||
error.message = "The file selected in 'Input Binary Field' is not in JSON format";
|
||||
errorDescription =
|
||||
"Try to change the operation or select a JSON file in 'Input Binary Field'";
|
||||
|
||||
Reference in New Issue
Block a user