Restore job type checking

This commit is contained in:
Eelco Dolstra 2020-03-04 15:16:26 +01:00
parent 69a6f3448a
commit 123bee1db5
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE

View file

@ -194,6 +194,11 @@ static void worker(
reply["attrs"] = std::move(attrs); reply["attrs"] = std::move(attrs);
} }
else if (v->type == tNull)
;
else throw TypeError("attribute '%s' is %s, which is not supported", attrPath, showType(*v));
} catch (EvalError & e) { } catch (EvalError & e) {
reply["error"] = filterANSIEscapes(e.msg(), true); reply["error"] = filterANSIEscapes(e.msg(), true);
} }