/**
 * Module dependencies
 */

var _ = require('lodash');


/**
 * @param  {?} err
 * @return {Boolean} whether this is an adapter-level constraint
 * violation (e.g. `unique`)
 */
module.exports = function isConstraintViolation(err) {
  return _.isString(err) && (
    err.match(/duplicate key value violates unique constraint/g) ||
    err.match(/^Bad request/ig)
  );
};

@@ -234,17 +234,15 @@
 ) %7B%0A
+%0A
   
-return 
+if (
 _.is
@@ -362,11 +362,294 @@
 ig)%0A
-
   )
+) %7B%0A    return true;%0A  %7D%0A%0A  // If a proper error code is specified, this error can be classified.%0A  else if (_.isObject(err) && err instanceof Error && err.code === 'E_UNIQUE') %7B%0A    return true;%0A  %7D%0A%0A  // Otherwise, this must not be a constraint violation error.%0A  else return false
 ;%0A%7D;

Fix my tab vice.