/// Exception thrown when Immich API operations fail. class ImmichException implements Exception { /// Error message. final String message; /// HTTP status code if available. final int? statusCode; /// Creates an [ImmichException] with the provided message. ImmichException(this.message, [this.statusCode]); @override String toString() { if (statusCode != null) { return 'ImmichException: $message (Status: $statusCode)'; } return 'ImmichException: $message'; } }