Api returning 500 error code after deploying to netlify but working locally

Please I need help. My APIs are all working locally but started returning error 500 when I deployed to Netlify. Someone to please help me out.

This is a NextJs App and I’m using fetch to call my api

Hi @femitosin,

I can see this error:

in your function log here: Netlify App

And the error doesn’t seem to be happening right now. Have you fixed this?

This is now fixed. It happened that I didn’t add the API to the environment