Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function(response) {
if (response.errors) {
let hash = errorsArrayToHash(response.errors);
Object.keys(hash).forEach(function(k) {
self.model.errors.set(k, hash[k].map((v) => { return { message: v } }));
});
}
if (this.newGroup && group) {
group.destroyRecord();
}
deferred.reject();
}
);