Skip to content

Commit 56269d6

Browse files
Merge pull request #299397 from TimShererWithAquent/us424061-09
Freshness Edit: Azure Functions (9 of several)
2 parents 6f235c7 + b641969 commit 56269d6

File tree

1 file changed

+25
-25
lines changed

1 file changed

+25
-25
lines changed

articles/azure-functions/functions-bindings-error-pages.md

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Azure Functions error handling and retry guidance
33
description: Learn how to handle errors and retry events in Azure Functions, with links to specific binding errors, including information on retry policies.
44
ms.topic: conceptual
55
ms.custom: devx-track-extended-java, devx-track-js, devx-track-python, devx-track-ts
6-
ms.date: 04/24/2024
6+
ms.date: 05/06/2025
77
zone_pivot_groups: programming-languages-set-functions
88
---
99

@@ -20,22 +20,22 @@ This article describes general strategies for error handling and the available r
2020

2121
Errors that occur in an Azure function can come from:
2222

23-
- Use of built-in Functions [triggers and bindings](functions-triggers-bindings.md).
24-
- Calls to APIs of underlying Azure services.
25-
- Calls to REST endpoints.
26-
- Calls to client libraries, packages, or third-party APIs.
23+
- Use of built-in Functions [triggers and bindings](functions-triggers-bindings.md)
24+
- Calls to APIs of underlying Azure services
25+
- Calls to REST endpoints
26+
- Calls to client libraries, packages, or non-Microsoft APIs
2727

2828
To avoid loss of data or missed messages, it's important to practice good error handling. This table describes some recommended error-handling practices and provides links to more information.
2929

3030
| Recommendation | Details |
3131
| ---- | ---- |
32-
| **Enable Application Insights** | Azure Functions integrates with Application Insights to collect error data, performance data, and runtime logs. You should use Application Insights to discover and better understand errors that occur in your function executions. To learn more, see [Monitor Azure Functions](functions-monitoring.md). |
32+
| **Enable Application Insights** | Azure Functions integrates with Application Insights to collect error data, performance data, and runtime logs. You should use Application Insights to discover and better understand errors that occur in your function executions. To learn more, see [Monitor executions in Azure Functions](functions-monitoring.md). |
3333
| **Use structured error handling** | Capturing and logging errors is critical to monitoring the health of your application. The top-most level of any function code should include a try/catch block. In the catch block, you can capture and log errors. For information about what errors might be raised by bindings, see [Binding error codes](#binding-error-codes). Depending on your specific retry strategy, you might also raise a new exception to run the function again. |
3434
| **Plan your retry strategy** | Several Functions bindings extensions provide built-in support for retries and others let you define retry policies, which are implemented by the Functions runtime. For triggers that don't provide retry behaviors, you should consider implementing your own retry scheme. For more information, see [Retries](#retries).|
3535
| **Design for idempotency** | The occurrence of errors when you're processing data can be a problem for your functions, especially when you're processing messages. It's important to consider what happens when the error occurs and how to avoid duplicate processing. To learn more, see [Designing Azure Functions for identical input](functions-idempotent.md). |
3636

3737
>[!TIP]
38-
> When using output bindings, you aren't able to handle errors that occur when accessing the remote service. Because of this, you should validate all data passed to your output bindings to avoid raising any known exceptions. If you must be able to handle such exceptions in your function code, you should access the remote service by using the client SDK instead of relying on output bindings.
38+
> When using output bindings, you aren't able to handle errors that occur when accessing the remote service. Because of this behavior, you should validate all data passed to your output bindings to avoid raising any known exceptions. If you must be able to handle such exceptions in your function code, you should access the remote service by using the client SDK instead of relying on output bindings.
3939
4040
## Retries
4141

@@ -63,10 +63,10 @@ The following table indicates which triggers support retries and where the retry
6363

6464
Azure Functions lets you define retry policies for specific trigger types, which are enforced by the runtime. These trigger types currently support retry policies:
6565

66-
+ [Azure Cosmos DB](./functions-bindings-cosmosdb-v2-trigger.md)
67-
+ [Event Hubs](./functions-bindings-event-hubs-trigger.md)
68-
+ [Kafka](./functions-bindings-kafka-trigger.md)
69-
+ [Timer](./functions-bindings-timer.md)
66+
- [Azure Cosmos DB](./functions-bindings-cosmosdb-v2-trigger.md)
67+
- [Event Hubs](./functions-bindings-event-hubs-trigger.md)
68+
- [Kafka](./functions-bindings-kafka-trigger.md)
69+
- [Timer](./functions-bindings-timer.md)
7070

7171
::: zone pivot="programming-language-python"
7272
Retry support is the same for both v1 and v2 Python programming models.
@@ -80,9 +80,9 @@ The retry policy tells the runtime to rerun a failed execution until either succ
8080
A retry policy is evaluated when a function executed by a supported trigger type raises an uncaught exception. As a best practice, you should catch all exceptions in your code and raise new exceptions for any errors that you want to result in a retry.
8181

8282
> [!IMPORTANT]
83-
> Event Hubs checkpoints aren't written until after the retry policy for the execution has completed. Because of this behavior, progress on the specific partition is paused until the current batch is done processing.
83+
> Event Hubs checkpoints aren't written until after the retry policy for the execution finishes. Because of this behavior, progress on the specific partition is paused until the current batch is done processing.
8484
>
85-
> The version 5.x of the Event Hubs extension supports additional retry capabilities for interactions between the Functions host and the event hub. For more information, see `clientRetryOptions` in the [Event Hubs host.json reference](functions-bindings-event-hubs.md#host-json).
85+
> The version 5.x of the Event Hubs extension supports extra retry capabilities for interactions between the Functions host and the event hub. For more information, see `clientRetryOptions` in the [Event Hubs host.json reference](functions-bindings-event-hubs.md#host-json).
8686
8787
### Retry strategies
8888

@@ -98,7 +98,7 @@ The first retry waits for the minimum delay. On subsequent retries, time is adde
9898

9999
---
100100

101-
When running in a Consumption plan, you are only billed for time your function code is executing. You aren't billed for the wait time between executions in either of these retry strategies.
101+
When running in a Consumption plan, you're only billed for time your function code is executing. You aren't billed for the wait time between executions in either of these retry strategies.
102102

103103
### Max retry counts
104104

@@ -347,17 +347,17 @@ public void run(
347347

348348
When you're integrating with Azure services, errors might originate from the APIs of the underlying services. Information that relates to binding-specific errors is available in the "Exceptions and return codes" sections of the following articles:
349349

350-
+ [Azure Cosmos DB](/rest/api/cosmos-db/http-status-codes-for-cosmosdb)
351-
+ [Blob Storage](functions-bindings-storage-blob-output.md#exceptions-and-return-codes)
352-
+ [Event Grid](../event-grid/troubleshoot-errors.md)
353-
+ [Event Hubs](functions-bindings-event-hubs-output.md#exceptions-and-return-codes)
354-
+ [IoT Hub](functions-bindings-event-iot-output.md#exceptions-and-return-codes)
355-
+ [Notification Hubs](functions-bindings-notification-hubs.md#exceptions-and-return-codes)
356-
+ [Queue Storage](functions-bindings-storage-queue-output.md#exceptions-and-return-codes)
357-
+ [Service Bus](functions-bindings-service-bus-output.md#exceptions-and-return-codes)
358-
+ [Table Storage](functions-bindings-storage-table-output.md#exceptions-and-return-codes)
350+
- [Azure Cosmos DB](/rest/api/cosmos-db/http-status-codes-for-cosmosdb)
351+
- [Blob Storage](functions-bindings-storage-blob-output.md#exceptions-and-return-codes)
352+
- [Event Grid](../event-grid/troubleshoot-errors.md)
353+
- [Event Hubs](functions-bindings-event-hubs-output.md#exceptions-and-return-codes)
354+
- [IoT Hub](functions-bindings-event-iot-output.md#exceptions-and-return-codes)
355+
- [Notification Hubs](functions-bindings-notification-hubs.md#exceptions-and-return-codes)
356+
- [Queue Storage](functions-bindings-storage-queue-output.md#exceptions-and-return-codes)
357+
- [Service Bus](functions-bindings-service-bus-output.md#exceptions-and-return-codes)
358+
- [Table Storage](functions-bindings-storage-table-output.md#exceptions-and-return-codes)
359359

360360
## Next steps
361361

362-
+ [Azure Functions triggers and bindings concepts](functions-triggers-bindings.md)
363-
+ [Best practices for reliable Azure functions](functions-best-practices.md)
362+
- [Azure Functions triggers and bindings concepts](functions-triggers-bindings.md)
363+
- [Best practices for reliable Azure functions](functions-best-practices.md)

0 commit comments

Comments
 (0)