replace space with _ in error.code