adapter.js
function(body) {
    if (_.isString(body)) {
      return body;
    } else if (_.isObject(body) && _.isString(body.error)) {
      return body.error;
    } else if (_.isObject(body) && _.isString(body.msg)) {
      return body.msg;
    } else if (_.isObject(body) && _.isObject(body.error)) {
      return this._extractError(body.error);
    } else if (_.isObject(body) && _.isString(body.message)) {
      return body.message;
    } else if (_.isObject(body) &&
      body.meta &&
      _.isString(body.meta.error_message)) {
      return body.meta.error_message;
    } else {
      return 'Unknown Request Error';
    }
  }
function(body) {
    if (_.isString(body)) {
      return body;
    } else if (_.isObject(body) && _.isString(body.error)) {
      return body.error;
    } else if (_.isObject(body) && _.isString(body.msg)) {
      return body.msg;
    } else if (_.isObject(body) && _.isObject(body.error)) {
      return this._extractError(body.error);
    } else if (_.isObject(body) && _.isString(body.message)) {
      return body.message;
    } else if (_.isObject(body) &&
      body.meta &&
      _.isString(body.meta.error_message)) {
      return body.meta.error_message;
    } else {
      return 'Unknown Request Error';
    }
  }
function ( body ) { if ( _ . isString ( body ) ) { return body ; } else if ( _ . isObject ( body ) && _ . isString ( body . error ) ) { return body . error ; } else if ( _ . isObject ( body ) && _ . isString ( body . msg ) ) { return body . msg ; } else if ( _ . isObject ( body ) && _ . isObject ( body . error ) ) { return this . _extractError ( body . error ) ; } else if ( _ . isObject ( body ) && _ . isString ( body . message ) ) { return body . message ; } else if ( _ . isObject ( body ) && body . meta && _ . isString ( body . meta . error_message ) ) { return body . meta . error_message ; } else { return 'Unknown Request Error' ; } }
If there's an error, try your damndest to find it.
APIs hide errors in all sorts of places these days

@param {String|Object} body
@return {String}
If there s an error try your damndest to find it . APIs hide errors in all sorts of places these days