停止和错误(Stop And Error)#
使用 Stop And Error 节点显示自定义错误消息,在特定条件下使执行失败,并将自定义错误信息发送到错误工作流。
🌐 Use the Stop And Error node to display custom error messages, cause executions to fail under certain conditions, and send custom error information to error workflows.
操作(Operations)#
- 错误消息
- 错误对象
节点参数(Node parameters)#
这两个操作都包含一个节点参数,错误类型。使用此参数选择要抛出的错误类型。在两种操作之间进行选择:错误信息和错误对象。
🌐 Both operations include one node parameter, the Error Type. Use this parameter to select the type of error to throw. Choose between the two operations: Error Message and Error Object.
其他参数取决于你选择的操作。
🌐 The other parameters depend on which operation you select.
错误消息参数(Error Message parameters)#
错误消息类型会添加一个参数,即 错误消息 字段。输入你希望抛出的消息。
🌐 The Error Message Error Type adds one parameter, the Error Message field. Enter the message you'd like to throw.
错误对象参数(Error Object parameters)#
错误对象错误类型添加了一个参数,错误对象。请输入包含你希望抛出的错误属性的 JSON 对象。
🌐 The Error Object Error Type adds one parameter, the Error Object. Enter a JSON object that contains the error properties you'd like to throw.
模板和示例(Templates and examples)#
相关资源(Related resources)#
您可以将“停止和错误”节点与“错误触发”(Error trigger)节点一起使用。
🌐 You can use the Stop And Error node with the Error trigger node.
在 n8n 工作流中阅读有关 错误工作流 的更多信息。
🌐 Read more about Error workflows in n8n workflows.