Better message when a object param is not found.
This commit is contained in:
parent
4d3dfa1dca
commit
35bf7dc484
@ -147,7 +147,6 @@ function resolveParams (method, params) {
|
||||
const isAdmin = this.user.hasPermission('admin')
|
||||
|
||||
const promises = []
|
||||
try {
|
||||
forEach(resolve, ([param, types], key) => {
|
||||
const id = params[param]
|
||||
if (id === undefined) {
|
||||
@ -166,9 +165,6 @@ function resolveParams (method, params) {
|
||||
promises.push(checkAuthorization.call(this, userId, object))
|
||||
}
|
||||
})
|
||||
} catch (error) {
|
||||
throw new NoSuchObject()
|
||||
}
|
||||
|
||||
return Bluebird.all(promises).return(params)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user