code: function error (message, error) {
      // get model name
      var modelName = defined(this) && defined(this.name) ? this.name : 'ImmutableCoreModel'
      // build custom error message
      message = `${modelName} error` + (
          typeof message === 'string'
              ? `: ${message}`
              : ''
      )
      // use error object passed in
      if (defined(error)) {
          // create data object with original message
          error.data = {
              error: {
                  code: error.code,
                  message: error.message,
              },
          }
      }
      // create new error message
      else {
          error = new Error(message)
          error.data = {}
      }
  
      return error
  }
docs: @function error
  
  create/update error object with query data
  
  @param {string} message
  @param {Error|undefined} error
  
  @returns {Error}