500 Internal error when deploying api using functions


I am experiencing some issues with my Netlify functions API at here. Specifically, when I try to access the API, I am receiving a 500 Internal Server Error.

I have followed the Netlify documentation carefully and I have tested my function locally using Netlify Dev and everything works fine. However, when I deploy the function to Netlify and try to access it via the generated URL, I receive the 500 error.

I have tried to troubleshoot the issue myself, but I have been unable to find a solution. I have also checked the Netlify dashboard and I can see that the function was deployed successfully without any errors.

I am hoping to receive some guidance and suggestions from the Netlify community on how to resolve this issue. Has anyone else experienced a similar issue with Netlify functions? What steps did you take to resolve it?

Any insights or suggestions would be greatly appreciated. Thank you in advance for your help.

Hi @willivmx sorry to hear you are having trouble with your function. This error is quite general so i’m not sure where to begin.

  1. Is there any errors your function code syntax/runtime?
  2. Would you mind sharing a screengrab of the env variables you have set in your dashboard
  3. Did you check the HTP request and response or the server logs/ Please share.

When I checked the console this is what I saw. Perhaps you could try resolving this as well and see if this may help?

Hello @SamO ,

Thank you for your reply. I can confirm that I did not find any errors in the syntax of my function code or its execution time. I also checked the HTTP requests and responses as well as the server logs, but did not find any obvious problems.

Regarding environment variables, I didn’t use any in my project since I didn’t need them.

Regarding the VM115:182 crbug/1173575 error, it seems to be a Chrome specific problem. I tried in other browsers and I didn’t encounter any error.

When I checked the http requests, I realized that there is no request to the server and no response.

I would like to notify you that I created a simple test api here that was supposed to return a simple hello world message to check if the problem was coming from my application but I encountered exactly the same problem.

I thank you for your time and help.

I am facing something similar it’s giving me internal 500 sever error while locally everything works as expected.

Don’t create a new thread as you have here Fallback page works locally but not on Netlify and then post on another thread about the same issue @Sameedahmad


As far as I can see, the function itself is correctly invoked: https://test-api-lcb-invest.netlify.app/.netlify/functions/test if you directly navigate to it. I believe something is going wrong during your redirection. I’d recommend changing your netlify.toml to:

  from = "/*"
  to = "/.netlify/functions/:splat"
  status = 200