+ // Force the server to return |error_type| in the error_code field of
+ // ClientToServerResponse on all subsequent sync requests. This method should
+ // not be called if TriggerActionableError has previously been called. Returns
+ // true if error triggering was successfully configured.
+ bool TriggerError(const sync_pb::SyncEnums::ErrorType& error_type);
+
+ // Force the server to return the given data as part of the error field of
+ // ClientToServerResponse on all subsequent sync requests. This method should
+ // not be called if TriggerError has previously been called. Returns true if
+ // error triggering was successfully configured.
+ bool TriggerActionableError(
+ const sync_pb::SyncEnums::ErrorType& error_type,
+ const std::string& description,
+ const std::string& url,
+ const sync_pb::SyncEnums::Action& action);
+
+ // Instructs the server to send triggered errors on every other request
+ // (starting with the first one after this call). This feature can be used to
+ // test the resiliency of the client when communicating with a problematic
+ // server or flaky network connection. This method should only be called
+ // after a call to TriggerError or TriggerActionableError. Returns true if
+ // triggered error alternating was successful.
+ bool EnableAlternatingTriggeredErrors();