错误

所有API方法均使用标准HTTP响应代码来表示成功或失败。

状态码 原因
200 Success - with the result in the response content
204 Success - with no further content
400 Bad request - see response format below
401 Not authorized - see Authentication
404 Not found - a resource wasn’t found
409 Version mismatch - see POST /flows
500 Server Error - something went wrong on the server

错误响应

对于400响应码,响应体将是一个包含以下字段的JSON对象:

字段 描述
code The error code
message The description of the error
{
  code: "module_already_loaded",
  message: "Module already loaded"
}

错误代码

代码 描述
unexpected_error An unexpected error occurred
invalid_request The request contains invalid parameters
settings_unavailable The storage system does not support changing settings
module_already_loaded The requested module is already loaded
type_in_use The request is attempting to remove/disable a node type that is currently being used
invalid_api_version The request specified an invalid api version in the Node-RED-API-Version header