Skip to content

Commit

Permalink
must use lowercase. add more try/catch
Browse files Browse the repository at this point in the history
  • Loading branch information
dsschult committed Oct 15, 2024
1 parent 68d4dc9 commit bf8edc6
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions iceprod/website/data/www_templates/submit.html
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,17 @@ <h4>$(task)</h4>
}
const schema = await ret.json();
} catch (error) {
$('#error').text('Error obtaining json schema: '+error.message);
$('#error').text('Error downloading json schema: '+error.message);
return false;
}
try {
const ajv = new Ajv2020({useDefaults: true});
const ajv = new ajv2020({useDefaults: true});
const validate = ajv.compile(schema);
} catch (error) {
$('#error').text('Error setting up json validator: '+error);
return false;
}
try {
return validate(config)
} catch (error) {
$('#error').text('Error validating config: '+validate.errors);
Expand Down

0 comments on commit bf8edc6

Please sign in to comment.