Reporting errors at the db more accurate now

new error codes back to client