docs: function buildErrorObject(params){
    params = params || {};
  
    //If the userDetail is already set, not building the error object again.
    if(params.err && params.err.userDetail){
      return params;
    }
  
    var err = params.err || {message: "Unexpected Error"};
    var msg = params.msg || params.err.message || "Unexpected Error";
    var httpCode = params.httpCode || 500;
    //Custom Error Code
    var code = params.code || "FH-MBAAS-ERROR";
  
    var response = {
      errorFields: {
        userDetail: msg,
        systemDetail: msg + ' - ' + util.inspect(err),
        code: code
      },
      httpCode: httpCode
    };
    if (params.explain) {
      response.errorFields.explain = params.explain;
    }
  
    return response;
  }