Skip to content
KiweelyKiweelyKiweely

Why Send Workday RaaS Request fails with ‘Key not found’ (HTTP 202) or times out at 5 minutes

Send Workday RaaS Request defaults to a 300-second timeout unless raised in Orchestration Settings, causing HTTP 406 or 500 errors at 5 minutes. When a RaaS call in a loop returns HTTP 202 (still processing) with an empty body, is2xxStatusCode() passes and parsing crashes with ‘Key not found’.

  • Checked against Workday on
  • Applies to Workday Orchestrate
  • 4 min read
  • Published
  • By Kiweely
On this page

Why Send Workday RaaS Request times out at 5 minutes (300 seconds)

Workday’s documentation appears to state two conflicting time limits for Reports-as-a-Service (RaaS):

  • Reference: Send Workday RaaS Request states: The RaaS report can take up to 1 hour to respond without timing out the orchestration. When the response is received, the overall orchestration timeout is reset.
  • Reference: WQL and RaaS Comparisons states: 5-minute timeout for RaaS API calls from the Workday Cloud Platform (WCP) Gateway (api.workday.com).

When you run a heavy Send Workday RaaS Request in an orchestration, the step frequently fails at exactly 5 minutes (300 seconds) with either an HTTP 406 or HTTP 500 response:

json
{"responseStatusCode": 406, "response": "406 : The result is taking too long to display in your browser."}

or:

json
{"responseStatusCode": 500, "response": "500 : Processing error occurred. java.lang.IllegalArgumentException: Account Request Type cannot be null"}

Root cause: The 300-second default timeout in Orchestration Settings

Historically, the Workday reporting framework did not enforce the client-supplied timeout parameter on RaaS executions. Workday now strictly enforces the timeout configured in your orchestration’s Settings tab, which defaults to 300 seconds (5 minutes). When the 300-second timer expires while the report is still executing, the reporting framework cancels the query and returns HTTP 406 (The result is taking too long to display in your browser) or HTTP 500.

How to increase the RaaS execution timeout up to 1 hour

To allow a long-running Send Workday RaaS Request to run beyond 5 minutes (up to the 1-hour / 3,600-second ceiling):

  1. In Orchestration Builder, click the gear icon above the canvas to open Orchestration Settings (or inspect the Settings tab).
  2. Locate the timeout setting (which defaults to 300 seconds) and increase it to match your report’s required execution window (for example, 1800 for 30 minutes or 3600 for 60 minutes).
  3. Save and redeploy the orchestration. Note from Reference: Send Workday RaaS Request that when you view the logs for a long-running RaaS request, Orchestrate automatically appends dsa to the endpoint URL; this is normal long-running RaaS routing and can be safely ignored.

Why Send Workday RaaS Request inside a loop fails with "Key not found" on HTTP 202

A second failure mode occurs when you place a Send Workday RaaS Request step inside a Loop or Batch Loop (with a fallback error branch if the report fails) and one specific parameter batch takes ~10–11 minutes to run. Instead of triggering your fallback error handler, the RaaS step is marked Succeeded with a completely empty response payload, and the very next step (such as a JSON/XML parser, lookup, or Create Values step) crashes immediately with:

text
Key not found

Root cause: HTTP 202 Accepted is treated as a 2xx success

When a RaaS request through the gateway is still processing when an intermediate gateway poll window expires, Workday can return HTTP 202 Accepted (“still processing”) with an empty response body.

Because 202 falls within the 200–299 HTTP status code range:

  1. A retry policy whose Successful Response Code Ranges is set to 200–299 treats 202 as a completed, successful response (isSuccess = true) and does not retry or enter the step’s local error handler.
  2. Any branch condition checking data.SendRaas.responseStatusCode.is2xxStatusCode() evaluates to true because .is2xxStatusCode() (Reference: Number Member Functions) returns true for any integer from 200 to 299.
  3. Execution skips your fallback branch and hands the empty 202 body directly to the next step, which throws Key not found when attempting to read the root report element or JSON key.

How to prevent HTTP 202 empty payloads from crashing your loop

Apply three defenses whenever a RaaS report can run for several minutes:

1. Restrict HTTP retry policy success codes to 200–200 and retry on 202

In Orchestration Settings -> HTTP Retries, configure the retry policy used by your RaaS or HTTP step so that only HTTP 200 (200 to 200) is considered a final success, and add a retry Condition for Status Code 202 with an exponential backoff interval.

2. Check responseStatusCode.equals(200) and non-empty body before parsing

Never rely solely on .is2xxStatusCode() before parsing a RaaS response that could return 202 or an empty dataset. In your Branch on Conditions or Continue on Conditions step, verify that the status code is specifically 200 and that the response payload has content:

javascript
data.SendWorkdayRaasRequest.responseStatusCode.equals(200).and(
  data.SendWorkdayRaasRequest.response.contentLength().greaterThan(0)
)

If you are extracting a JSON or XML key from a RaaS report that may legitimately return zero rows for a given prompt parameter (when Workday omits the root Report_Entry array on an empty JSON report), use the WithDefault extraction functions—such as .arrayAtJsonPathWithDefault("$.Report_Entry", "[]".asJSON()) or .stringAtXPathWithDefault("/wd:Report_Data/wd:Report_Entry/wd:Worker_ID", "")—instead of .objectAtJsonPath or .stringAtJsonPath, which throw an exception when the key is absent.

3. Move Send Workday RaaS Request outside of loops

As a general rule, avoid calling Send Workday RaaS Request repeatedly inside a Loop or Batch Loop. A RaaS step inside a loop disables loop pipelining and multiplies report startup overhead by the number of iterations. Instead, run the RaaS report once before the loop (or use a paginated Send Paged Workday REST Call with WQL if you need partitioned extracts), and join or filter the records inside the orchestration using a Join Loop or Batch Loop with Group strategy.

How to verify RaaS timeout and empty-payload handling in the tenant

  1. Open Orchestration Settings, verify that the timeout is raised above 300 seconds for long-running reports, and deploy the app.
  2. Run the orchestration with a parameter set that previously timed out at 5 minutes and confirm in Orchestration Activity that the Send Workday RaaS Request step runs past the 300-second mark and completes with responseStatusCode = 200.
  3. Test the orchestration with prompt parameters that return zero rows from the Custom Report and verify that your contentLength().greaterThan(0) and WithDefault guards prevent Key not found exceptions.

Sources checked

Related guides

All guides

Let Workday check the work.

Kiweely writes WQL and builds orchestrations in your own tenant, and Workday, not Kiweely, says whether they passed.

Get the next guide in your inbox.

One email a month with new guides and one Extend tip. Nothing else.

We’ll email you once to confirm. Unsubscribe in one click from any issue.