Unable to view server error logs in Azure SWA using Application Insights
I'm using a NextJS 14 web app on Azure SWA, and am getting the error below:
An error occurred in the Server Components render. The specific message is omitted in production builds to avoid leaking sensitive details. A digest property is included on this error instance which may provide additional details about the nature of the error.
I found multiple online articles explaining how to get the error logs, but nothing works. Also this app works fine locally and in AWS Amplify with no errors at all with almost the identical setup. This error has something to do with trying to access the "Azure Database for PostgreSQL - Flexible Server" instance which is also working fine on localhost. But it is failing on Azure SWA.
- How do I get the error logs??? Seems like a super basic thing but turns out to be impossibly hard to do in Azure, which is quite surprising.
- What would the problem possibly be?
Thanks in advance for your kind help here. I am stuck now!