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.
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.
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:
[[redirects]]
from = "/*"
to = "/.netlify/functions/:splat"
status = 200