I am making a profile and edit profile page for user both of which are dynamic pages. In edit profile page I am using an API to get user's data in getserversideprops and then using another API which will edit the user's data on an onClick event on the button. The code is working fine when I run locally and even the build is running fine on local but on live server the Edit profile page is throwing me 500 Internal Server Error. I can't understand what's the reason for this and how to solve it.