500 Error on API Route: /api/analyze?username=xyz

Hi Netlify team,

I’m encountering a 500 Internal Server Error when accessing the following route on my deployed site:

https://cryforhelp.netlify.app/api/analyze?username=ReallyRickAstley

any username for that matter

  • Framework: Next.js
  • Site name: cryforhelp.netlify.app
  • Build command: next build
  • Publish directory: .next

What I’ve Tried:

  • All required environment variables have been added to the Netlify dashboard
  • Verified the function works locally with netlify dev
  • Clean rebuild and deploy

Any help would be much appreciated — thanks in advance!

@Anna1 Have you checked the Function logs?
https://docs.netlify.com/functions/logs/