package com.atridad.ascently.data.sync

import java.io.IOException
import java.io.Serializable

sealed class SyncException(message: String) : IOException(message), Serializable {
    object NotConfigured :
        SyncException("Sync is not configured. Please set server URL and auth token.")

    object NotConnected : SyncException("Not connected to server. Please test connection first.")

    object Unauthorized : SyncException("Unauthorized. Please check your auth token.")

    object ImageNotFound : SyncException("Image not found on server")

    data class ServerError(val code: Int) : SyncException("Server error: HTTP $code")
    data class InvalidResponse(val details: String) :
        SyncException("Invalid server response: $details")

    data class NetworkError(val details: String) : SyncException("Network error: $details")
}
