function mockCIAPError(code, message, retry = undefined) {
  const error = new Error(message);
  error['code'] = code;
  error['retry'] = retry;
  return error;
}
Returns mock CIAP error.
@param {string} code The error code.
@param {string} message The error message.
@param {function()=} retry The optional retry callback.
@return {!Error}