when I create a duplicate entity, and get a corresponding error
{
“code”: 1155,
“message”: “Duplicate entry”
}
afterCreate event handler is still called.
when I create a duplicate entity, and get a corresponding error
{
“code”: 1155,
“message”: “Duplicate entry”
}
afterCreate event handler is still called.
This behaviour is expected.
AfterCreate would be called in both cases. If request passes - created object would be available through “res.result”, and if request fails - error object would be available through “res.error” inside the handler.
Ok, thank you