tracardi
tracardi copied to clipboard
Event should be saved even if it does not pass validation
Describe the bug
Now the error is returned when the event does not pass event validation. It is OK by the event should be saved with the status not validated. There should be no way to loose send event data event the event is not correct.
To Reproduce
Steps to reproduce the behavior:
- Create strict JSONSchema validator like:
{
"event@properties": {
"type": "object",
"required": [
"firstName"
],
"properties": {
"firstName": {
"type": "string",
"description": "The person's first name."
},
"lastName": {
"type": "string",
"description": "The person's last name."
},
"age": {
"description": "Age in years which must be equal to or greater than zero.",
"type": "integer",
"minimum": 0
}
}
}
}
- Test it without required
firstName - It should return error
- And the event should not be saved.
Expected behavior
Event with status invalid. Also the session should be saved but no profile created. No rules and workflows should be executed.