update error as enum class