Adding error codes to errors.