added standard_error_codes for mercury
merging wit upstream