Skip to main content Skip to complementary content

Error handling

This page covers the various ways Qlik Application Automation for OEM handles errors.

On error setting per block

For each block in an automation, you can choose how errors are handled for this block. See the On error setting of a block, under the tab Settings of the pane on the right hand side of the automation editor:

The On Error setting of a Get Contact By Id block.

The Settings tab of a Get Contact By Id block. The On Error field is set to Stop - Stop Datan automation and set to failed.

The following options are available:

  • Stop: the automation will stop execution when the first error occurs in this block. The job status will be set to Failed.
  • Warning: the automation will continue to run, the error will be logged in the job, and the job status will be set to Finished with warnings.
  • Ignore: the error will be ignored, the error will not be logged, and the job will have status Finished (if there are no other errors).

Email notifications

When an automation fails (job is in status Failed), a notification email will be sent to all Admins of the account. These notifications will not be sent to Users (who are not Admins).

A maximum of 5 notification emails will be sent out per automation per day.

Notification emails are not sent out for jobs in status Warning, only for jobs in status Failed.

SaaS Companies - receive notifications from all your customer accounts

If you are a SaaS company, you can configure a central mailbox to receive email notifications from all your customer accounts. See the useremail parameter in the SSO flow. You can also use Central logging to centralize all logs of your customer accounts.

Jobs

You can view the history of all runs (jobs) of an automation, and filter by status:

An automation's History tab.

An automation's History tab. The Status dropdown field is set to Any, and two Finished runs and one Failed run are displayed.

Jobs can have one of the following statuses:

  • Not started
  • Starting
  • Running
  • Stopped
  • Finished
  • Finished with warnings
  • Failed

You can use the Search feature to do a free text search across all jobs of an automation. For example, if you want to debug an automation, you can search for a name or email address of a contact that was processed. The Search results will show you all the jobs where said person was processed (subject to the retention of job logs) and for each job in which block inputs/outputs that person was present.

Maximum number of jobs per automation

Note that Qlik Application Automation for OEM keeps a maximum of 5000 jobs per automation and also a maximum of 500 MB of jobs per automation. If this maximum is exceeded, older jobs are deleted.

Catch and handle error in the automation

You can use the error formula to catch the error of a block:

{ $.state.blockName.error }

Example error:

error: Error calling endpoint 'Hubspot - Create Company'
  endpoint
  name: Create Company
  datasource: Hubspot
  request
  url: https://api.hubapi.com/companies/v2/companies
  method: POST
  response
  status: 502
  body: <html>
        <head><title>502 Bad Gateway</title></head>
        <body bgcolor='white'>
        <center><h1>502 Bad Gateway</h1></center>
        </body>
        </html>
external error: true

Example to get the full error object:

{ $.state.getContact.error }

Examples to get one field from the above error:

{$.state.getContact.error.response.status} ---> result: "502"
{$.state.getContact.error.responses.body} ---> result: "&#062;html&#060;... 502 Bad Gateway... &#062;/html&#060;"

Make sure to add single quotes around "response code" and "response body" since these properties (keys) contain a space character!

You can use a Condition block to check for an error and handle it appropriately:

Error handling with a Condition block.

an automation consisting of a Start block, a Get Contact By Id block, and a Condition block connected to an Output block. If the Get Contact By Id block produces an error, the Condition block activates the Output block to handle the error.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!