refs #5858 perf: change UserError message
gitea/salix/pipeline/head There was a failure building this commit Details

This commit is contained in:
Javier Segarra 2023-12-11 07:38:42 +01:00
parent 94147bd2b2
commit f9ea77fa39
1 changed files with 1 additions and 1 deletions

View File

@ -16,7 +16,7 @@ const validations = [{
module = module.substring(0, module.length - 1);
model = models[module];
}
if (!model) throw new UserError('');
if (!model) throw new Error('No matching model found');
const {accepts} = model.sharedClass.methods().find(method => method.name === path);
for (const [key, value] of Object.entries(body)) {
const accept = accepts.find(acc => acc.arg === key);