[autotest] create_job should fail if the metahost cannot run the job

If one passes a specific list of hosts into `create_job`, then those
hosts are vetted to make sure they satisfy the dependencies of the job.

If one passes in a metahost, no checking is done.  This is unfortunate,
as it means one needs to be very careful when scheduling jobs with
metahosts to make sure that it is actually possible for the job to run.
Instead, let's just do the checking in the RPC and raise an
easy-to-identify Exception if we do hit this case.

BUG=chromium:250586
DEPLOY=apache
TEST=unit, Scheduled a job with a metahost and DEPENDENCIES that did not
exist.  Got an error.NoEligibleHostException.  Both dummy and bvt still
run (testing provisionable labels and tests with unsatisfyable
dependencies).

Change-Id: I020be2607867fafd04194b9c17d3052b006f60e0
Reviewed-on: https://chromium-review.googlesource.com/66603
Tested-by: Alexander Miller <milleral@chromium.org>
Reviewed-by: Dan Shi <dshi@chromium.org>
Reviewed-by: Prashanth Balasubramanian <beeps@chromium.org>
Commit-Queue: Alexander Miller <milleral@chromium.org>
diff --git a/frontend/afe/json_rpc/proxy.py b/frontend/afe/json_rpc/proxy.py
index cbb60e9..b9e1121 100644
--- a/frontend/afe/json_rpc/proxy.py
+++ b/frontend/afe/json_rpc/proxy.py
@@ -56,7 +56,8 @@
     for cls in JSONRPCException.__subclasses__():
         if error['name'] == cls.__name__:
             return cls(error, error_message)
-    for cls in exceptions.CrosDynamicSuiteException.__subclasses__():
+    for cls in (exceptions.CrosDynamicSuiteException.__subclasses__() +
+                exceptions.RPCException.__subclasses__()):
         if error['name'] == cls.__name__:
             return cls(error_message)
     return JSONRPCException(error_message)