Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
]).then(() => {
if (errors.length > 0) {
reject(new InvalidBodyError(...errors))
} else {
resolve(request)
}
})
})