This how-to guide introduces an effective way to reference the integratorErrors object, develop custom error messages, and learn new ways to display them.
To review the basics of error handling, view our Introduction to Error Handling article.
Using a Data Workflow to Reference integratorErrors
Use a Data Workflow component to incorporate integrateErrors in the following ways:
When data manipulation or modification is required.
When dealing with objects and arrays.
Configuration
For this example, you’ll configure a Plug-In component that includes error handling. The Plug-In component is triggered by a Button component, and an error trigger is initiated in your Data Workflow if the Plug-In component fails to complete its designated task. Subsequently, the integratorErrors object references the error that occurred, and a specific error message is displayed in a modal. For this example, the appearance of the error message indicates success.
These instructions assume you have a new module open, saved, and with a title.
Select the tab that corresponds to your Unqork Designer experience:
Configure the Button Component
Begin by adding a Button component to trigger your Plug-In component.
In the Module Builder, drag and drop a Button component onto your canvas.
In the Property ID field, enter
btnFireError.In the Label Text field, enter
Submit Error.From the Action Type drop-down, select Event.
From the On Click drop-down, select pluginCallError.

Click Save Component.
Configure the Plug-In Component
Next, configure a Plug-In component to execute a broken API call. Any remote execution that ensures a broken API call is beneficial, as it helps to examine different error codes and messages that might arise. So, you’ll use the Combine PDFs internal API call. You’ll retain the Data Source URL as the default for this configuration, which guarantees that the API call lacks sufficient information to operate effectively. Subsequently, the Plug-In component will send its Error Trigger to initiate the Data Workflow.
Drag and drop a Plug-In component onto your canvas, placing it below the
Submit ErrorButton component.In the Property ID and Canvas Label Text fields, enter
pluginCallError.In the Error Trigger field, enter
dwfErrorHandling.From the Internal Services drop-down, select Combine PDFs. The Data Source URL automatically populates with /fbu/uapi/pdfbar/combine.
The Plug-In component does not fire correctly if you do not change the autopopulated Data Source URL.

Click Save Component.
Configure the Hidden Components
Next, configure two Hidden components to store the error response codes and error messages for the respective error codes.
Drag and drop two Hidden components onto your canvas, placing them below the
pluginCallErrorPlug-In component.In the Property ID and Label Text fields, enter the following:
#
Property ID
Canvas Label Text
1
errorCode
errorCode
2
errorMessage
errorMessage
Click Save Component after adding each component.
Configure the Decisions Component
Now, configure the Decisions component to display the error messages based on the error response code. The error codes and messages are customized to ensure you consider every potential error.
Drag and drop a Decisions component onto your canvas, placing it below your Hidden components.
In the Property ID and Canvas Label Text fields, enter
ruleErrorPopMessage.In the Inputs table, enter the following:
#
Source
Type
Required
1
errorCode
exact
(checked)In the Outputs table, enter the following:
#
Source
Type
1
errorMessage
popError
In the Conditionals table, enter the following:
#
errorCode
errorMessage_popError
1
400
400 Bad Request: Invalid request and/or request is not formed properly. Reformulate the request.
2
401
401 Not Authorized: Invalid credentials, or authentication credentials must be provided.
3
404
404 Not Found: Invalid URL request, or the resource in question doesn't exist.
4
500
500 Internal Server Error: Error encountered by the Internal server. A notification is sent, and the error is investigated.
5
502
502 Bad Gateway: Internal systems error or upgrade in progress. Or, the internal system is overloaded, and the issue will resolve soon.
6
503
503 Service Unavailable: The request cannot be processed as a result of the suspension of this service.

Click Save Component.
Configure the Data Workflow Component
Now, configure the Data Workflow. The unsuccessful Plug-In component triggers the error code and runs the Data Workflow. The Data Workflow outputs the response code and message for that specific error.
Drag and drop a Data Workflow component onto your canvas, placing it between your
pluginCallErrorPlug-In and Hidden components.In the Property ID and Canvas Label Text fields, enter
dwfErrorHandling.
Configure the Input Operator
Begin by adding an Input operator to reference the input integratorErrors. However, note that integratorErrors is located outside of the data object, so it cannot be selected from the operator's Component drop-down menu. You must manually input the integratorErrors because it’s not included in your configuration.
Drag and drop an Input operator onto your Data Workflow canvas.
Configure the operator's Info window as follows:
Setting
Value
Category
Input
Component
Required
Yes
Source
Default
In the Component field of the operator’s Info window, double-click and enter
integratorErrors.Press Enter (Return) on your keyboard.
Configure the code Get Operator
Next, configure a Get operator to retrieve the response code of your error.
Drag and drop a Get operator onto your Data Workflow canvas.
Configure the operator's Info window as follows:
Setting
Value
Category
Input
Label
code
Path
pluginCallError.code
Connect the output port (right) of the
integratorErrorsInput operator to the input port (left) of thecodeGet operator.
Configure the errorCode Output Operator
Now, configure an Output operator to output the response code of the error to your errorCode Hidden component.
Drag and drop an Output operator onto your Data Workflow canvas.
Configure the operator's Info window as follows:
Setting
Value
Category
Output
Component
errorCode
Action
value
Connect the output port (right) of the
codeGet operator to the input port (left) of theerrorCodeOutput operator.
Configure the message Get Operator
Next, configure another Get operator to retrieve the custom message for the error.
Drag and drop a Get operator onto your Data Workflow canvas.
Configure the operator's Info window as follows:
Setting
Value
Category
Input
Label
message
Path
pluginCallError.message
Connect the output port (right) of the
integratorErrorsInput operator to the input port (left) of themessageGet operator.
Configure the errorMessage Output Operator
Next, configure another Output operator to output the error message to your errorMessage Hidden component.
Drag and drop an Output operator onto your Data Workflow canvas.
Configure the operator's Info window as follows:
Setting
Value
Category
Output
Component
errorMessage
Action
value
Connect the output port (right) of the
messageGet operator to the input port (left) of theerrorMessageOutput operator.
Configure the ruleErrorPopMessage Output Operator
Configure another Output operator that triggers your Decisions component and displays the error message.
Drag and drop an Output operator onto your Data Workflow canvas.
Configure the operator's Info window as follows:
Setting
Value
Category
Output
Component
ruleErrorPopMessage
Action
trigger
Connect the output port (right) of the
messageGet operator to the input port (left) of theruleErrorPopMessageOutput operator.
Configure the Console Operator
Lastly, configure a Console operator and connect it to your integratorErrors Input operator. The integratorErrors object for your error displays, emphasizing the importance of your custom error messages.
Drag and drop a Console operator onto your Data Workflow canvas.
Configure the operator's Info window as follows:
Setting
Value
Category
Console
Label
integratorErrors
Connect the output port (right) of the
integratorErrorsInput operator to the input port (left) of theintegratorErrorsConsole operator.
Click Save Component.
Save your module.
Here’s how your completed module looks in the Module Builder:

Preview your module in Express View and open the DevTools Console. Click the Submit Error button, and you’ll notice that a 400 response code displays. If you expand the integratorErrors Console and the pluginCallError data, the following message displays: "/pdfbar/combine expects an array \"pdfUrls\" to combine". Some of these default messages lack information, but the custom message in your modal provides more details about the issue. This error alerts you to the incorrectly formatted API request in your Plug-in component.

Configure the Button Component
Begin by adding a Button component to trigger your Plug-In component.
In the Module Builder, drag and drop a Button component onto your canvas.
In the Property ID field, enter
btnFireError.In the Label Text field, enter
Submit Error.Set the Action Type as Event.
From the On Click drop-down, select pluginCallError.

Click Save & Close.
Configure the Plug-In Component
Next, configure a Plug-In component to execute a broken API call. Any remote execution that ensures a broken API call is beneficial, as it helps to examine different error codes and messages that might arise. So, you’ll use the Combine PDFs internal API call. You’ll retain the Data Source URL as the default for this configuration, which guarantees that the API call lacks sufficient information to operate effectively. Subsequently, the Plug-In component will send its Error Trigger to initiate the Data Workflow.
Drag and drop a Plug-In component onto your canvas, placing it below the
Submit ErrorButton component.In the Property ID and Canvas Label Text fields, enter
pluginCallError.In the Error Trigger field, enter
dwfErrorHandling.From the Internal Services drop-down, select Combine PDFs. The Data Source URL automatically populates with /fbu/uapi/pdfbar/combine. Don’t make any changes to the URL.
The Plug-In component does not fire correctly if you do not change the autopopulated Data Source URL.

Click Save.
Configure the Hidden Components
Next, configure two Hidden components to store the error response codes and error messages for the respective error codes.
Drag and drop two Hidden components onto your canvas, placing them below the
pluginCallErrorPlug-In component.In the Property ID and Canvas Label Text fields, enter as follows:
Property ID
Canvas Label Text
errorCode
errorCode
errorMessage
errorMessage
Save each component.
Configure the Decisions Component
Now, configure the Decisions component to display the error messages based on the error response code. The error codes and messages are customized to ensure you consider every potential error.
Drag and drop a Decisions component onto your canvas, placing it below your Hidden components.
In the Property ID and Canvas Label Text fields, enter
ruleErrorPopMessage.In the Inputs table, enter the following:
Property ID
Type
Required
errorCode
exact
(checked)In the Outputs table, enter the following:
Property ID
Type
errorMessage
popError
In the Micro Decisions table, enter the following:
Input Values
Output Values
errorCode
errorMessage_popError
400
400 Bad Request: Invalid request and/or request is not formed properly. Reformulate the request.
401
401 Not Authorized: Invalid credentials, or authentication credentials must be provided.
404
404 Not Found: Invalid URL request, or the resource in question doesn't exist.
500
500 Internal Server Error: Error encountered by the Internal server. A notification is sent, and the error is investigated.
502
502 Bad Gateway: Internal systems error or upgrade in progress. Or, the internal system is overloaded, and the issue will resolve soon.
503
503 Service Unavailable: The request cannot be processed as a result of the suspension of this service.

Click Save.
Configure the Data Workflow Component
Now, configure the Data Workflow. The unsuccessful Plug-In component triggers the error code and runs the Data Workflow. The Data Workflow outputs the response code and message for that specific error.
Drag and drop a Data Workflow component onto your canvas, placing it between your
pluginCallErrorPlug-In and Hidden components.In the Canvas Label Text and Property Name fields, enter
dwfErrorHandling.
Configure the Input Operator
Start by adding an Input operator. The Input operator references the input integratorErrors. However, note that integratorErrors is located outside of the data object, so it cannot be selected from the operator's Component drop-down menu. You need to manually input the integratorErrors since it is not included in your configuration.
Drag and drop an Input operator onto your Data Workflow canvas.
Configure the operator's Info window as follows:
Setting
Value
Category
Input
Component
Required
Yes
Source
Default
In the Component field of the operator’s Info window, double-click and enter
integratorErrors.Press Enter (Return) on your keyboard.
Configure the code Get Operator
Next, configure a Get operator to retrieve the custom message for the error.
Drag and drop a Get operator onto your Data Workflow canvas.
Configure the operator's Info window as follows:
Setting
Value
Category
Input
Label
code
Path
pluginCallError.code
Connect the output port (right) of the
integratorErrorsInput operator to the input port (left) of themessageGet operator.
Configure the errorCode Output Operator
Now, configure an Output operator to output the response code of the error to your errorCode Hidden component.
Drag and drop an Output operator onto your Data Workflow canvas.
Configure the operator's Info window as follows:
Setting
Value
Category
Output
Component
errorCode
Action
value
Connect the output port (right) of the
codeGet operator to the input port (left) of theerrorCodeOutput operator.
Configure the message Get Operator
Next, configure a Get operator to retrieve the custom message for the error.
Drag and drop a Get operator onto your Data Workflow canvas.
Configure the operator's Info window as follows:
Setting
Value
Category
Input
Label
message
Path
pluginCallError.message
Connect the output port (right) of the
integratorErrorsInput operator to the input port (left) of themessageGet operator.
Configure the errorMessage Output Operator
Next, configure another Output operator to output the error message to your errorMessage Hidden component.
Drag and drop an Output operator onto your Data Workflow canvas.
Configure the operator's Info window as follows:
Setting
Value
Category
Output
Component
errorMessage
Action
value
Connect the output port (right) of the
messageGet operator to the input port (left) of theerrorMessageOutput operator.
Configure the ruleErrorPopMessage Output Operator
Configure another Output operator that triggers your Decisions component and displays the error message.
Drag and drop an Output operator onto your Data Workflow canvas.
Configure the operator's Info window as follows:
Setting
Value
Category
Output
Component
ruleErrorPopMessage
Action
trigger
Connect the output port (right) of the
messageGet operator to the input port (left) of theruleErrorPopMessageOutput operator.
Configure the Console Operator
Lastly, configure a Console operator and connect it to your integratorErrors Input operator. The integratorErrors object for your error displays, emphasizing the importance of your custom error messages.
Drag and drop a Console operator onto your Data Workflow canvas.
Configure the operator's Info window as follows:
Setting
Value
Category
Console
Label
integratorErrors
Connect the output port (right) of the
integratorErrorsInput operator to the input port (left) of theintegratorErrorsConsole operator.
Click Save.
Save your module.
Here’s how your completed module looks in the Module Builder:

Preview your module in Express View and open the DevTools Console. Click the Submit Error button, and you’ll notice that a 400 response code displays. If you expand the integratorErrors Console and the pluginCallError data, the following message displays: "/pdfbar/combine expects an array \"pdfUrls\" to combine". Some of these default messages lack information, but the custom message in your modal provides more details about the issue. This error alerts you to the incorrectly formatted API request in your Plug-in component.
