src/request.js
function parseSafeMessage(message, status) {
  if (typeof message === 'object') {
    return {status: message.errorCode, message: message.description};
  } else {
    return {status: status, message: message};
  }
}
function parseSafeMessage(message, status) {
  if (typeof message === 'object') {
    return {status: message.errorCode, message: message.description};
  } else {
    return {status: status, message: message};
  }
}
function parseSafeMessage ( message , status ) { if ( typeof message === 'object' ) { return { status : message . errorCode , message : message . description } ; } else { return { status : status , message : message } ; } }
Sometimes the message returns is an object with a 'description' and 'errorCode' property
@param message
Sometimes the message returns is an object with a description and errorCode property