"arch/x86/kernel/i387.c" did not exist on "6ab3d5624e172c553004ecc862bfeac16d9d68b7"
Commit c1fa452d authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_web: Improve error message/handling when software type is not a part of the json.

parent d4727173
......@@ -396,6 +396,13 @@
software_type = getSoftwareTypeFromForm(g.props.element),
json_dict = getFormValuesAsJSONDict(g.props.element),
serialisation_type = getSerialisationTypeFromForm(g.props.element);
if (software_type === "") {
if (g.options.parameter.shared) {
throw new Error("The software type is not part of the json (" + software_type + " as slave)");
}
throw new Error("The software type is not part of the json (" + software_type + ")");
}
return g.validateJSONForSoftwareType(json_url, software_type, json_dict)
.push(function (validation) {
......@@ -627,6 +634,12 @@
if (softwaretype === undefined) {
softwaretype = option_selected;
}
if (input.children.length === 0) {
if (options.parameter.shared) {
throw new Error("The software type is not part of the json (" + softwaretype + " as slave)");
}
throw new Error("The software type is not part of the json (" + softwaretype + ")");
}
if (json['software-type'][softwaretype] === undefined) {
throw new Error("The sotware type is not part of the json (" + softwaretype + ")");
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment