Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
.then((res) => {
let error = null;
const validationReults = services.validator.validate(res, 'computation');
if (validationReults.error) {
error = validationReults.error.details;
}
this.setState({ activeSchema: res, validationErrors: error });
})
.catch(console.log);