/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

package org.mozilla.sync;

/**
 * TODO: name?
 */
public class FirefoxSyncGetCollectionException extends Exception {
    private final FailureReason failureReason;

    public FirefoxSyncGetCollectionException(final Throwable cause, final FailureReason failureReason) {
        super(failureReason.toString(), cause);
        this.failureReason = failureReason;
    }

    public FailureReason getFailureReason() { return failureReason; }

    public enum FailureReason { // TODO: To RecommendedAction?
        REQUIRES_LOGIN_PROMPT, // TODO: should we be more specific? less specific so multiple ways to handle? Return more data?
        UNKNOWN,
    }
}

@@ -237,476 +237,1361 @@
 %0A * 
-TODO: name?%0A */%0Apublic class FirefoxSyncGetCollectionException extends Exception %7B%0A    private final FailureReason failureReason;%0A%0A    public FirefoxSyncGetCollectionException(final Throwable cause, final FailureReason failureReason) %7B%0A        super(failureReason.toString(), cause);%0A        this.failureReason = failureReason;%0A    %7D%0A%0A    public FailureReason getFailureReason() %7B return failureReason; %7D%0A%0A    public enum FailureReason %7B // TODO: To RecommendedAction?
+A Exception that occurs while a user tries to get data located in one of their Sync collections,%0A * like history or bookmarks.%0A *%0A * Note that the exceptions returned by %7B@link #getCause()%7D may include user info like email addresses%0A * so be careful how you log them.%0A * todo: %5E do we want to strip the stuff ourselves?%0A */%0Apublic class FirefoxSyncGetCollectionException extends Exception %7B%0A    private final FailureReason failureReason;%0A%0A    public FirefoxSyncGetCollectionException(final String message, final FailureReason failureReason) %7B%0A        super(message + %22. %22 + failureReason.toString());%0A        this.failureReason = failureReason;%0A    %7D%0A%0A    public FirefoxSyncGetCollectionException(final Throwable cause, final FailureReason failureReason) %7B%0A        super(failureReason.toString(), cause);%0A        this.failureReason = failureReason;%0A    %7D%0A%0A    /**%0A     * Gets the reason this exception was thrown. Normally, this would be handled by the type of the exception thrown%0A     * but because these Exceptions are not thrown but passed by callback, this is used instead.%0A     *%0A     * @return the reason this exception was thrown.%0A     */%0A    public FailureReason getFailureReason() %7B return failureReason; %7D%0A%0A    // Some reasons: https://github.com/mozilla/fxa-auth-server/blob/master/docs/api.md#response-format%0A    public enum FailureReason %7B
 %0A   

Clean up GetCollectionException.