Skip to content

search.py: add VOYAGE_API_KEY guard at startup #2

@daniel-rudaev

Description

@daniel-rudaev

query.py validates VOYAGE_API_KEY at startup but search.py doesn't. Without it, users get a confusing NoneType error instead of a clear message.

Fix:

if not VOYAGE_API_KEY:
    print("[ERROR] VOYAGE_API_KEY not set in .env"); sys.exit(1)

Add this after load_dotenv() in search.py.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions