changed error codes internal representation to strings instead of numbers for easier debugging
fixed global database error handling