Skip to content

Enhance PDF generation with error handling and API key validation - #1

Open
Aman-Pal287 wants to merge 1 commit into
ankurdotio:mainfrom
Aman-Pal287:main
Open

Enhance PDF generation with error handling and API key validation#1
Aman-Pal287 wants to merge 1 commit into
ankurdotio:mainfrom
Aman-Pal287:main

Conversation

@Aman-Pal287

Copy link
Copy Markdown

Why this change

Earlier, the backend was crashing during server startup when the Gemini API key was missing. That made the project hard to run, especially for beginners or anyone trying the project later without setting up the API key first.

What this PR does

  • adds proper error handling around PDF generation
  • validates the Gemini API key before using Gemini-dependent functionality
  • prevents the whole server from crashing at startup if the API key is not configured
  • makes the project more beginner-friendly and easier to set up locally

Impact

Now, if the Gemini API key is missing, the project will not fail immediately on startup. Instead, only the Gemini-related functionality will be affected, while the rest of the application can still run normally.

@Aman-Pal287
Aman-Pal287 marked this pull request as draft June 11, 2026 16:17
@Aman-Pal287
Aman-Pal287 marked this pull request as ready for review July 25, 2026 12:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants