'use client' import { useState } from 'react' import { Card } from '@/components/ui/card' import { Button } from '@/components/ui/button' import { Collapsible, CollapsibleContent, CollapsibleTrigger, } from '@/components/ui/collapsible' import { Database, Server, ChevronDown, ExternalLink } from 'lucide-react' import { ConnectionError } from '@/lib/types/config' interface ConnectionErrorOverlayProps { error: ConnectionError onRetry: () => void } export function ConnectionErrorOverlay({ error, onRetry, }: ConnectionErrorOverlayProps) { const [showDetails, setShowDetails] = useState(false) const isApiError = error.type === 'api-unreachable' return (
{isApiError ? 'The Open Notebook API server could not be reached' : 'The API server is running, but the database is not accessible'}
Set the API_URL environment variable:
# For Docker:
docker run -e API_URL=http://your-host:5055 ...
# For local development (.env file):
API_URL=http://localhost:5055
Check if SurrealDB is running:
# For Docker:
docker compose ps | grep surrealdb
docker compose logs surrealdb
For detailed setup instructions, see:
Open Notebook Documentation
{error.details.stack}
Press R or click the button to retry