Update ErrorCodes to enums.