chore: snapshot current working tree changes
Save all currently accumulated repository changes as a backup snapshot for Gitea so no local work is lost.
This commit is contained in:
27
aiform_dev2/docs/n8n_code_error_response.js
Normal file
27
aiform_dev2/docs/n8n_code_error_response.js
Normal file
@@ -0,0 +1,27 @@
|
||||
// Code23 — помещаем в n8n-nodes-base.code (JS), Mode = Run Once for All Items
|
||||
|
||||
// Берём все входные элементы
|
||||
const items = $input.all();
|
||||
|
||||
// Предполагаем, что нас интересует первый элемент массива
|
||||
const data = items[0].json;
|
||||
|
||||
// Всегда возвращаем сообщение об ошибке
|
||||
const answerText = 'Извините, произошла ошибка, мы уже работаем над ее устранением, попробуйте задать ваш вопрос еще раз через некоторое время';
|
||||
|
||||
// Собираем единый объект для следующего узла
|
||||
return [
|
||||
{
|
||||
json: {
|
||||
...data,
|
||||
respound: {
|
||||
type: 'text',
|
||||
text: answerText,
|
||||
replyMarkup: {
|
||||
remove_keyboard: true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user