code: function createError(code, details) {
      var error = {
          code: code,
          message: errors.get(code) || "Internal Server Error"
      };
  
      if (details) error["data"] = details;
  
      return error;
  }
docs: Creates a JSON-RPC 2.0-compliant error.
  @param {Number} code - error code
  @param {String} details - error details
  @return {Object}