code: function parseChangeError(e, modelObj) {
      if (e && e.name.indexOf('Thorin') === 0) return e;
      let wrapError = thorin.error('INPUT.NOT_VALID', 'Invalid value for entity.', 400),
        fields = [];
      if (e instanceof Error) {
        switch (e.name) {
          case 'SequelizeValidationError':
            wrapError.message = e.errors[0].message;
            e.errors.forEach((err) => {
              if (err.path.indexOf('thorinValidate') === -1) { // field validator.
                fields.push(err.path);
              }
            });
            break;
          case 'SequelizeUniqueConstraintError':
            wrapError.code = 'INPUT.EXISTS';
            wrapError.message = "An entry with the same " + e.errors[0].path.substr(modelObj.tableName.length + 1) + ' already exists.';
            e.errors.forEach((err) => {
              fields.push(err.path.substr(modelObj.tableName.length + 1));
            });
            break;
          default:
            e = thorin.error(e);  // default error.
        }
      }
      if (fields.length === 1) {
        wrapError.data = {
          field: fields[0]
        }
      } else if (fields.length > 1) {
        wrapError.data = {
          fields: fields
        };
      }
      return wrapError;
    }
docs: /*
  Error parser for create and update.