Skip to content

Commit b7ff97a

Browse files
authored
Merge pull request #227355 from brettsam/azfd005
adding doc for functions external startup error
2 parents b87f636 + 809206d commit b7ff97a

File tree

2 files changed

+37
-0
lines changed

2 files changed

+37
-0
lines changed

articles/azure-functions/TOC.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -860,6 +860,8 @@
860860
href: errors-diagnostics/diagnostic-events/azfd0003.md
861861
- name: AZFD0004
862862
href: errors-diagnostics/diagnostic-events/azfd0004.md
863+
- name: AZFD0005
864+
href: errors-diagnostics/diagnostic-events/azfd0005.md
863865
- name: host.json 2.x reference
864866
href: functions-host-json.md
865867
- name: host.json 1.x reference
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
title: "AZFD0005: External startup exception"
3+
titleSuffix: "Azure Functions"
4+
description: "AZFD0005: External startup exception"
5+
author: brettsam
6+
ms.author: brettsam
7+
ms.topic: troubleshooting
8+
ms.date: 02/14/2023
9+
---
10+
11+
# AZFD0005: External startup exception
12+
13+
This event occurs when an external startup class throws an exception during function app initialization.
14+
15+
| | Value |
16+
|-|-|
17+
| **Event ID** |AZFD0005|
18+
| **Category** |[Usage]|
19+
| **Severity** |Error|
20+
21+
## Event description
22+
23+
An external startup class is a class registered with the `FunctionsStartupAttribute`. It is often used to register services or configuration sources for dependency injection. For more information on the feature, see [use dependency injection in .NET Azure Functions](../../functions-dotnet-dependency-injection.md).
24+
25+
If a call to either of the `Configure()` methods on the `FunctionsStartup` class throws an exception, it will cause the function app initialization to fail. The functions host will catch this exception, log the error, and retry initialization. This retry helps to recover from transient errors, but permanent errors may be logged many times as the host retries.
26+
27+
If `APPLICATIONINSIGHTS_CONNECTION_STRING` is set as an app setting, the error will also be logged as an `exception` in Application Insights.
28+
29+
## How to resolve the event
30+
31+
Every occurrence of this event is unique to the application. Investigate the error message and stack trace to see what may need to be done to prevent this error in the future. For example, a timeout may need to be retried; or an error calling an external service may need to be handled.
32+
33+
## When to suppress the event
34+
35+
This event shouldn't be suppressed.

0 commit comments

Comments
 (0)