Serverside changes to error insertion into database