Hello @Wai Priya Sharma
This is a Generic Issue with EntityAutoEngine in which success message is appended to result after invoking create, update, delete, expire methods. Due to this, the success message is always appended to the result even if the create, update, delete, expire methods are returning error.
Now Added a conditional check that if the method (create, update, delete, expire) is returning success then only it will append success message to the result.
Please find the attached patch with the proper fix.
Tagging Rohit Koushal Deepak Dixit