How catch SQL Exception?

The difficult thing is that SQL typically doesn’t throw exceptions, and if
there is one, it’s throw by cakephp and isn’t specific to a create issue.
Even if you can catch the error, the ORM will always log any SQL error.

If it’s a known issue, it might be better to do a find on the unique
transaction ID, and if the record already exists, drop the rest of the
processing.