You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This app setting was added as a temporary way for apps on Node.js v18 and lower to replicate a breaking change introduced in Node.js v20+. Starting in Node.js v20, Azure Functions treats entry point errors as blocking errors and log the errors in Application Insights. In Node.js v18 or lower, entry point errors are ignored as warnings and aren't visible in Application Insights.
324
+
This app setting is a temporary way for Node.js apps to enable a breaking change that makes entry point errors easier to troubleshoot. It's highly recommended to set this to `true` on Node.js v18 or lower, especially for programming model v4 apps which always use entry point files. The behavior without the breaking change treats entry point errors as warnings and will not log them in Application Insights.
325
325
326
-
For Node.js v20+, this app setting has no effect. For Node.js v18 or lower, the default behavior depends on your programming model version:
327
-
- Model v3: The default value for the app setting is `0`.
328
-
- Model v4: The default value for the app setting depends on if the error happens before or after the first model v4 function is registered (by calling `app.http()`, `app.timer()`, etc.).
329
-
- If the error is thrown before, the default behavior matches a setting value of `0`. For example, if your entry point file doesn't exist, the error is ignored.
330
-
- If the error is thrown after, the default behavior matches a setting value of `1`. For example, if you try to register the same function name a second time, the error blocks your app from running and is logged in app insights.
326
+
Starting with Node.js v20, the app setting has no effect and the breaking change behavior is always enabled.
331
327
332
-
This setting is most applicable to model v4 apps, because they require entry point files unlike model v3. It's highly recommended to set the app setting to `1`, because ignoring entry point errors can lead to unexpected behavior (like "No functions found"). Since the ignored warnings don't show up in app insights, it can be difficult to troubleshoot any problems. When changing the setting to `1`, you may need to fix any errors that were previously ignored.
328
+
For Node.js v18 or lower, the app setting can be used and the default behavior depends on if the error happens before or after a model v4 function has been registered:
329
+
- If the error is thrown before, the default behavior matches `false`. For example, if you are using model v3 or your entry point file doesn't exist.
330
+
- If the error is thrown after, the default behavior matches `true`. For example, if you try to register duplicate functions.
Copy file name to clipboardExpand all lines: articles/azure-functions/functions-node-troubleshoot.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -46,7 +46,7 @@ Try the following fixes:
46
46
- When running in Azure:
47
47
- Make sure you're using [Azure Functions Runtime Version](./functions-versions.md) 4.25 or higher.
48
48
- Make sure you're using Node.js v18 or higher.
49
-
- Set the app setting [`FUNCTIONS_NODE_BLOCK_ON_ENTRY_POINT_ERROR`](./functions-app-settings.md#functions_node_block_on_entry_point_error) to `1`. This setting is recommended for all model v4 apps and ensures that all entry point errors are visible in your application insights logs.
49
+
- Set the app setting `FUNCTIONS_NODE_BLOCK_ON_ENTRY_POINT_ERROR` to `true`. This setting is recommended for all model v4 apps and ensures that all entry point errors are visible in your application insights logs. For more information, see [App settings reference for Azure Functions](./functions-app-settings.md#functions_node_block_on_entry_point_error).
50
50
- Check your function app logs for entry point errors. The following example query shows how to view entry point errors for your app in the past day:
0 commit comments