Overhault to the error system
Make the database layer work with the new error system
OverHaul and making ready for database sharding