src/notewise/errors.py and rooted at NoteWiseError.
Exception Hierarchy
Exception Details
| Exception | Cause | Resolution |
|---|---|---|
| ConfigurationError | API key for selected model not set | Run notewise config or notewise setup --force |
| ValidationError | Malformed URL or invalid option | Check URL format and try again |
| VideoUnavailableError | Video is private, age-restricted, or removed | Use --cookie-file or verify video is public |
| TranscriptUnavailableError | No transcript available in requested language | Run notewise info "URL" to check available languages |
| PlaylistError | Playlist unavailable or invalid ID | Verify playlist is public and ID is correct |
| IPBlockError | YouTube blocked the request | Reduce YOUTUBE_REQUESTS_PER_MINUTE and retry |
| ExtractionError | General YouTube extraction failure | Run notewise logs --tail 50 for details |
| LLMGenerationError | LLM API call failed after retries | Verify API key and quota with notewise config |
| PersistenceError | SQLite read/write failure | Run notewise doctor, or clear cache with notewise cache --clear --yes |
Quick Triage
| Symptom | Start Here |
|---|---|
| Auth / private access failures | VideoUnavailableError — use --cookie-file |
| No captions available | TranscriptUnavailableError — try --language en |
| LLM call failures | LLMGenerationError — check API key and quota |
| Unexpected error | Run notewise logs --tail 100 for full details |
CLI Error Handling
Theprocess command maps exceptions to user-visible failure panels. Exit code is 1 when any video fails.
Exception details
NoteWiseError
NoteWiseError
Base class for all NoteWise exceptions. Accepts a message and optional keyword context arguments appended to
str(error).ConfigurationError
ConfigurationError
Raised when the application configuration is invalid or required settings are missing.Cause: The API key for the selected model is not set.Resolution:
ValidationError
ValidationError
Raised for invalid user input — malformed YouTube URLs, bad option values, or missing required arguments.Resolution: Check the URL or option value and try again.
UserVisibleCliError
UserVisibleCliError
A structured CLI failure rendered as a Rich panel without a traceback. Contains:
title— the panel headingrows— list of(label, value)tuplesintro— optional introductory text
YouTubeError - VideoUnavailableError
YouTubeError - VideoUnavailableError
YouTubeError - TranscriptUnavailableError
YouTubeError - TranscriptUnavailableError
YouTubeError - PlaylistError
YouTubeError - PlaylistError
Raised when a playlist cannot be fetched or enumerated (private playlist, invalid ID).Resolution: Verify the playlist is public and the ID is correct. For private playlists, supply a
--cookie-file.YouTubeError - IPBlockError
YouTubeError - IPBlockError
Raised when YouTube detects unusual traffic and blocks the request.Resolution: Reduce
YOUTUBE_REQUESTS_PER_MINUTE in your config and retry later.YouTubeError - ExtractionError
YouTubeError - ExtractionError
General YouTube extraction failure not covered by the more specific subclasses.Resolution:
LLMGenerationError
LLMGenerationError
Raised when the LLM API call fails after all retries are exhausted (Check your API key validity and quota with the provider.
LLM_NUM_RETRIES = 3). Includes a redacted summary of the underlying API error.Resolution:PersistenceError
PersistenceError
Raised when SQLite read/write operations fail.Resolution: Run
notewise doctor to check cache database health. If corrupted, clear with notewise cache --clear --yes.Quick triage by symptom
Auth / private access failures
Start with
VideoUnavailableError and PlaylistError. For signed-in resources, provide --cookie-file and retry. See Private Videos.No captions or language mismatch
Start with
TranscriptUnavailableError:LLM call failures
Check
LLMGenerationError: validate API key, quota, and model access for the configured provider with notewise config.Unexpected failure
CLI error handling
Theprocess command maps exceptions to user-visible failure panels. Unhandled exceptions are logged to the session log file and a truncated error panel pointing to the log is shown. Exit code is 1 when any video fails.
