error(data) {
    const error = {};

    // Populate error object from data passed in
    if (typeof data === 'string') {
      error.title = data;
    } else if (data instanceof Error) {
      error.title = data.message || data.toString();
    } else if (typeof data === 'object') {
      Object.assign(error, data);
    } else {
      throw new Error('Unexpected error data');
    }

    return this.res.status(400).json(error);
  }
Send a 400 error response to client.
Derives error object from data passed in
@param {(string|Error|object)} data - string, Error, or preformed object