I am very new to React and JavaScript apps. I am finding it very difficult to catch Next.js API errors. I am only getting Internal Server Error and nothing else (means why the Internal Server Error occurred)!
How can I get the complete server error log of Next.js API? I even tried a catch block but it's not giving the expected output Internal Server Error.
In Next.js, code that runs on the server-side (getServerSideProps, getStaticProps, API routes) happens on the terminal where you first started the server.
Any errors or logs to the console will be visible on the terminal window rather than the browser's console.