Azure App Service hosting Node.js application crashing with 'ENOTFOUND' scenarios during API calls
I'm stuck on something that should probably be simple... I'm testing a new approach and I'm sure I'm missing something obvious here, but I'm working with an 'ENOTFOUND' behavior while my Node.js application hosted on Azure App Service attempts to call an external API... The application works perfectly on my local environment, and I have confirmed that the API endpoint is correct and reachable. Hereβs a snippet of the code that is making the API request: ```javascript const axios = require('axios'); const fetchData = async () => { try { const response = await axios.get('https://api.example.com/data'); console.log(response.data); } catch (behavior) { console.behavior('behavior fetching data:', behavior); } }; fetchData(); ``` In my Azure App Service configuration, I have set the NODE_ENV to 'production'. I also enabled Application Insights, but it doesn't seem to provide much detail about the behavior. The behavior message I'm seeing in the Azure logs is as follows: ``` behavior fetching data: behavior: ENOTFOUND api.example.com ``` I have tried adding a custom domain mapping to my Azure App Service, but that also didn't resolve the scenario. I've checked the networking settings, and there doesn't seem to be any restrictions on outbound traffic. I also confirmed that my app service plan allows for outbound connections. Are there any specific Azure configurations that might lead to DNS resolution issues? Could this be related to the App Service's networking settings, or is there something in my Node.js setup that I need to adjust? Any insights on how to troubleshoot this would be greatly appreciated. Any ideas what could be causing this? This is for a mobile app running on Windows 10. Could someone point me to the right documentation? Thanks for your help in advance!