Skip to content

Commit 3adb03d

Browse files
committed
new topic
1 parent 3dd442e commit 3adb03d

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
title: Retrying tasks after an error
3+
description: Check for errors and retry them.
4+
services: batch
5+
documentationcenter: .net
6+
author: LauraBrenner
7+
manager: evansma
8+
editor: ''
9+
tags: azure-batch
10+
11+
ms.assetid: 16279b23-60ff-4b16-b308-5de000e4c028
12+
ms.service: batch
13+
ms.topic: article
14+
ms.tgt_pltfrm:
15+
ms.workload: big-compute
16+
ms.date: 02/15/2020
17+
ms.author: labrenne
18+
ms.custom: seodec18
19+
---
20+
21+
# Detecting errors
22+
23+
It is important to remember to check for errors when working with a REST service API. It isn't uncommon for errors to occur when running batch jobs.
24+
25+
## Common errors
26+
27+
- Networking failures which means the request never reached Batch or the Batch response didn't reach the client in time.
28+
- Internal server errors which is a standard 5xx status code HTTP response.
29+
- Throttling can cause errors such as 429 or 503 status code HTTP responses with the Retry-after header.
30+
- 4xx errors which include such errors as AlreadyExists and InvalidOperation. This means that the resource is not in the correct state for the state transition requested by the customer.
31+
32+
## When to retry
33+
34+
The Batch APIs will notify you if there is a failure. They can all be retried and include a global retry handler for that purpose. It is best to use this built-in mechanism.
35+
36+
After a failure, you should wait a bit (several seconds between retries) before retrying. If you retry too frequently or too quickly, you will be throttled. This is managed by the retry handler.
37+
38+
39+
For detailed information about each API and their default retry policies, read [Batch Status and Error Codes](https://docs.microsoft.com/rest/api/batchservice/batch-status-and-error-codes).

0 commit comments

Comments
 (0)