So I know this issue is duplicate of this issue but in my case I have created my own API with Nextjs it gives results as expected in my deployment server. But as soon as I take it to production it fails.
Before that I wrote everything in getStaticProps() and it worked but when I created an API from it, its failing in production. Here is the Github link for the repository
Please help, Thanks in Advance :)