Problem
In app/api/wakatime/route.ts, when Supabase credentials
are not configured (local dev or CI/Playwright test suites),
supabaseAdmin.from(...) throws an error. Although wrapped
in a try/catch, it logs the exception and returns a 500
Internal Server Error instead of a clean fallback response.
This causes smoke tests to fail in CI environments where
Supabase is not configured.
Impact
- CI/Playwright smoke tests fail with 500 errors
- Local development without Supabase credentials breaks
- No clean fallback for unconfigured environments
Proposed Fix
Check isSupabaseAdminAvailable at the start of the handler.
If false, return a clean fallback:
if (!isSupabaseAdminAvailable) {
return NextResponse.json({
hasData: false,
not_configured: true
}, { status: 200 });
}
File
app/api/wakatime/route.ts
I'd like to work on this fix if approved!
GSSoC '26 contributor.
Problem
In
app/api/wakatime/route.ts, when Supabase credentialsare not configured (local dev or CI/Playwright test suites),
supabaseAdmin.from(...)throws an error. Although wrappedin a try/catch, it logs the exception and returns a 500
Internal Server Error instead of a clean fallback response.
This causes smoke tests to fail in CI environments where
Supabase is not configured.
Impact
Proposed Fix
Check
isSupabaseAdminAvailableat the start of the handler.If false, return a clean fallback:
File
app/api/wakatime/route.tsI'd like to work on this fix if approved!
GSSoC '26 contributor.