You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When creating an SMTP credential via the n8n API at POST {{baseUrl}}/credentials, the request body includes disableStartTls: true along with secure: false. However, the API returns an error indicating that the data is of a prohibited type (object Object). This seems to be due to schema validation issues, especially around the disableStartTls field. request.body.data does not match allOf schema [subschema 0] with 2 error[s]:,request.body.data does not match allOf schema [subschema 0] with 1 error[s]:,request.body.data is of prohibited type [object Object]
When request In UI the error same
To Reproduce
Send a POST request to {{baseUrl}}/credentials with the following JSON body:
application/json
{
"name": "smtp_server",
"type": "smtp",
"data": {
"user": "exampleUser",
"password": "examplePassword",
"host": "example.com",
"port": 443,
"hostName": "exampleHostName",
"secure": false,
"disableStartTls": true
}
}
Observe the response from the API.
Expected behavior
The SMTP credential should be created successfully. The disableStartTls flag should be allowed when secure is set to false, as per the logic defined in the schema. Additionally, the API should not reject the request due to a type mismatch or schema validation error.
Operating System
n8nio/n8n
n8n Version
1.88.0
Node.js Version
v20.19.0
Database
SQLite (default)
Execution mode
main (default)
The text was updated successfully, but these errors were encountered:
Bug Description
When creating an SMTP credential via the n8n API at POST {{baseUrl}}/credentials, the request body includes disableStartTls: true along with secure: false. However, the API returns an error indicating that the data is of a prohibited type (object Object). This seems to be due to schema validation issues, especially around the disableStartTls field.
request.body.data does not match allOf schema [subschema 0] with 2 error[s]:,request.body.data does not match allOf schema [subschema 0] with 1 error[s]:,request.body.data is of prohibited type [object Object]
When request In UI the error same
To Reproduce
application/json
{
"name": "smtp_server",
"type": "smtp",
"data": {
"user": "exampleUser",
"password": "examplePassword",
"host": "example.com",
"port": 443,
"hostName": "exampleHostName",
"secure": false,
"disableStartTls": true
}
}
Expected behavior
The SMTP credential should be created successfully. The disableStartTls flag should be allowed when secure is set to false, as per the logic defined in the schema. Additionally, the API should not reject the request due to a type mismatch or schema validation error.
Operating System
n8nio/n8n
n8n Version
1.88.0
Node.js Version
v20.19.0
Database
SQLite (default)
Execution mode
main (default)
The text was updated successfully, but these errors were encountered: