Integrated error handling with mysql implementation