REST API Job Retries Continuously on Non-200 HTTP Response Codes
search cancel

REST API Job Retries Continuously on Non-200 HTTP Response Codes

book

Article ID: 429436

calendar_today

Updated On:

Products

CA Automic Workload Automation - Automation Engine

Issue/Introduction

REST API jobs in Automic Workload Automation continue to retry even when receiving non-200 HTTP response codes (such as 401 Unauthorized or 404 Not Found), leading to execution delays and potential account lockouts.

 

Symptoms:

  • Jobs continue to retry until the maximum retry limit is exhausted despite a terminal error state.

  • Unauthorized responses (401) result in multiple failed login attempts, potentially locking service accounts.

  • Significant delays occur before a job finally returns a failed status.

 

 

Environment

CA Automic Workload Automation - Automation Engine

 

Cause

This occurs when using the built-in retry logic for REST Agent jobs where the response status is not 200 OK.

 

Resolution

This behavior is currently working as designed. The built-in retry logic is specifically engineered to retry until the response status is 200 OK and/or a specific value match is delivered. There is currently no native functionality to stop retries based on specific non-200 received statuses (e.g., 401 or 404).

 

If alternative behavior is required please open a case with support to open an enhancement request and consider the following options in the meantime:

  1. Use Post-Condition In Workflows: If the job is part of a workflow, use the PostCondition section to evaluate the task status.

    • A status of 0 typically indicates a successful 200 response.

    • A status > 0 indicates a non-200 response or error.

    • Configure the appropriate action (e.g., ABEND, CANCEL, or STOP WORKFLOW) based on these results to prevent further automated retries.

  2. Implement Custom Shell Scripts: If Post-conditions do not meet your requirements, use a shell script (Unix or Windows).

    • Use tools like curl or PowerShell to execute the REST request.

    • Script the logic to test the specific HTTP result codes and response data.

    • Programmatically set the job to pass or fail based on your custom criteria.