Log client errors in database