refs #5858 perf: change UserError message
gitea/salix/pipeline/head There was a failure building this commit
Details
gitea/salix/pipeline/head There was a failure building this commit
Details
This commit is contained in:
parent
94147bd2b2
commit
f9ea77fa39
|
@ -16,7 +16,7 @@ const validations = [{
|
||||||
module = module.substring(0, module.length - 1);
|
module = module.substring(0, module.length - 1);
|
||||||
model = models[module];
|
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);
|
const {accepts} = model.sharedClass.methods().find(method => method.name === path);
|
||||||
for (const [key, value] of Object.entries(body)) {
|
for (const [key, value] of Object.entries(body)) {
|
||||||
const accept = accepts.find(acc => acc.arg === key);
|
const accept = accepts.find(acc => acc.arg === key);
|
||||||
|
|
Loading…
Reference in New Issue