MP1-4155: some cleanup in error codes, added error messages