错误

所有API方法均采用标准的HTTP应答编码表示成功或失败状态。

状态编码 原因
200 成功 - with the result in the response content
204 成功 - with no further content
400 错误请求 - see response format below
401 未授权 - see Authentication
404 未找到 - a resource wasn’t found
409 版本不匹配 - see POST /flows
500 服务器故障 - something went wrong on the server

Error response

For a 400 response code, the body of the response will be a JSON object containing the fields:

Field Description
code The error code
message The description of the error
{
  code: "module_already_loaded",
  message: "Module already loaded"
}

Error codes

Code Description
unexpected_error An unexpected error occured
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