Designing and configuring exception handling
Azure Batch provides error codes, logs, and monitoring events to identify and handle errors. Once the errors are identified, we can handle them programmatically via APIs and .NET code.
Here are some examples of error codes returned by Batch:
You can get the complete list of error codes here: https://docs.microsoft.com/en-us/rest/api/batchservice/batch-status-and-error-codes.
Next, let's look at some common error types in Azure Batch.
Types of errors
There are four common groups of errors:
- Application errors: For application errors, Azure Batch writes standard output and standard error to
stdout.txt
andstderr.txt
files in the task directory on the compute node. We can parse these files to identify the issue and take remedial measures. - Task errors: A task is considered failed if it returns a non-zero exit code. The failure could happen due...