Describe the issue/error/question
I want to send a request in programming style. I’m using this.helpers.httpRequest
function.
But when execution nothing happens. No error and no result. Even when the url is wrong
This is a part of my code. BatchBodyChunks
is not empty but two other console logs are never excuting!
// This variable is not empty
console.log(BatchBodyChunks);
// Send each chunk
BatchBodyChunks.forEach(async (bodyChunk) => {
try {
const response = await this.helpers.httpRequest({
url: `${credentials['baseUrl']}/${credentials['apiKey']}/sms/sendarray.json`,
method: 'POST',
body: bodyChunk,
headers: {
'content-type': 'application/json; charset=utf-8',
},
});
// !!! Never reached
console.log('response', response);
} catch (error) {
// !!! Never reached
console.log('error !!!!!!!!!!!!!!!!!!!!!!! :', error);
}
});
Console log:
2023-01-05T10:56:11.033Z | debug | Running node "Kavenegar SMS" finished successfully "{ node: 'Kavenegar SMS', workflowId: '1', file: 'WorkflowExecute.js' }"
2023-01-05T10:56:11.034Z | debug | Received child process message of type processHook for execution ID 448. "{ executionId: '448', file: 'WorkflowRunner.js' }"
2023-01-05T10:56:11.035Z | debug | Executing hook on node "Kavenegar SMS" (hookFunctionsPush) "{\n executionId: '448',\n sessionId: 'zp11ic52l2',\n workflowId: '1',\n file: 'WorkflowExecuteAdditionalData.js',\n function: 'nodeExecuteAfter'\n}"
2023-01-05T10:56:11.035Z | debug | Send data of type "nodeExecuteAfter" to editor-UI "{\n dataType: 'nodeExecuteAfter',\n sessionId: 'zp11ic52l2',\n file: 'Push.js',\n function: 'send'\n}"
2023-01-05T10:56:11.037Z | verbose | Workflow execution finished successfully "{\n workflowId: '1',\n file: 'WorkflowExecute.js',\n function: 'processSuccessExecution'\n}"
2023-01-05T10:56:11.038Z | debug | Received child process message of type processHook for execution ID 448. "{ executionId: '448', file: 'WorkflowRunner.js' }"
2023-01-05T10:56:11.038Z | debug | Executing hook (hookFunctionsSave) "{\n executionId: '448',\n workflowId: '1',\n file: 'WorkflowExecuteAdditionalData.js',\n function: 'workflowExecuteAfter'\n}"
2023-01-05T10:56:11.040Z | debug | Received child process message of type end for execution ID 448. "{ executionId: '448', file: 'WorkflowRunner.js' }"
2023-01-05T10:56:11.047Z | debug | Executing hook (hookFunctionsPush) "{\n executionId: '448',\n sessionId: 'zp11ic52l2',\n workflowId: '1',\n file: 'WorkflowExecuteAdditionalData.js',\n function: 'workflowExecuteAfter'\n}"
2023-01-05T10:56:11.048Z | debug | Save execution progress to database for execution ID 448 "{\n executionId: '448',\n workflowId: '1',\n file: 'WorkflowExecuteAdditionalData.js',\n function: 'workflowExecuteAfter'\n}"
2023-01-05T10:56:11.048Z | debug | Send data of type "executionFinished" to editor-UI "{\n dataType: 'executionFinished',\n sessionId: 'zp11ic52l2',\n file: 'Push.js',\n function: 'send'\n}"
2023-01-05T10:56:11.055Z [Rudder] debug: no existing flush timer, creating new one
Information on your n8n setup
- n8n version: 0.209.4