Troubleshooting DataMasker

Updated on August 30, 2023

Exception Log Generation –

The “Generate Exception Log” button is now available on the execution record page, Now click on the “Generate Exception Log”

Check the checkbox and click on “Run”

It will show the exceptions in the Exception Log column and in the files section

Identify Bulk Job Exceptions

DataMasker uses Bulk API 2.0 to mask records. Sometimes records being updated by Bulk Job can fail because of an underlying exception. Bulk API 2.0 provides REST endpoints that allow admins to fetch a raw response that shows exception records. Here are the steps to get the exception raw response.

Identify Bulk Jobs with errors

SELECT pcldm__Type__c, pcldm__Entity_Id__c, pcldm__Records_Total__c, pcldm__Records_Processed__c, pcldm__Records_Errored__c    FROM pcldm__Entity_Log__c    WHERE pcldm__Type__c = ‘Bulk Job Id’ AND pcldm__Records_Errored__c > 0 AND pcldm__Execution_Log__r.pcldm__Execution__r.Name=’Execution-XXXX’

Update Execution-XXXX with the name of your execution. This SOQL will return the Bulk Job ID in the 2nd column( pcldm__Entity_Id__c). Make a note of these Bulk Job IDs, we will need them in the next step.

Login to workbench.salesforce.com

Use your Salesforce credentials and select the latest API version from the drop-down.

Once you are in the workbench, navigate to Utilities->Rest Explorer and execute the REST endpoint as shown below

Example: Rest Call

/services/data/v56.0/jobs/ingest/750DE000006dnTH/failedResults

Note: Update the version from v56.0 to the latest one and replace the ‘750DE000006dnTH’ with your Bulk Job ID

Generate Exception Logs

Data masking is a complex operation and can run into issues because of a variety of reasons- Data, Metadata, and Salesforce Platform limitations. DataMasker has a way to capture exceptions in a custom object. This functionality only needs to be enabled, if Cloud Compliance support requests so.

Here are the steps:

Step 1: Search Custom Metadata Type

In your Salesforce Org, search for “Custom Metadata Types”

Step 2: Update Metadata Value

Click on ‘Manage Records’ for ‘DM App Config’

Click on the ‘Edit’ link

 
Update the value to “True”

The value of ‘Label Capture_Exceptions’ is now successfully set to “True”. This means DataMasker will now capture metadata exceptions.

Troubleshooting Internal Server Error Issues

“Getting error InternalServerError: Connection pool is shutting down: ConnectionPool2:InvalidJobState: Job has been set to terminal state”

This is a standard salesforce exception – ‘InvalidJobState’ which means the job state specified in a job update operation is invalid. Hence it is set to a terminal state.

It has nothing to do with DataMasker Application.
User can ignore these types of errors because they will be fixed in the Retry Operation of DataMasker.

Resolution: To get more details about such types of exceptions, the user can raise a case with Salesforce.