---
sourceDocument: Yokohama IT Operations Management
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/yokohama/it-operations-management

 Release :

    - yokohama

ft:locale :

    - en-US

ft:publication_title :

    - Yokohama IT Operations Management

ft:clusterId :

    - itom

bundleId :

    - itom

workflow :

    - Technology


---

# Fix the cause of a sensor error message

# Fix the cause of a sensor error message {#ariaid-title1}

* Release version: Yokohama
* 
* Updated March 26, 2026
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 1 minute to read

To fix a Discovery sensor error message, you must fix the JavaScript file containing the code that generated the error.

## Before you begin

Verify the following:

* You have access to the Discovery Definition modules.
* You have completed the steps in [Find the cause of a sensor error message](https://servicenow-prod.fluidtopics.net/2nOW~xoGc1LVVX8SeJG81A "Use this procedure to identify a Discovery sensor error.").
{#t_FixTheCauseOfASensorErrorMessage__ul_xj2_4c3_s3c}Role required: admin

## About this task

Use the sensor name and stack trace you identified in [Find the cause of a sensor error message](https://servicenow-prod.fluidtopics.net/2nOW~xoGc1LVVX8SeJG81A "Use this procedure to identify a Discovery sensor error.") to locate the failing code. The stack trace provides the line number and function name where the error occurred.  
Note:  
The exact fix depends on the specific sensor and payload. This topic describes where and how to fix the error, not specific code changes. Contact ServiceNow Support for complex cases.

## Procedure

1. Navigate to the Discovery Definition module where the error occurred.  
   For example, navigate to Discovery DefinitionScript Includes.
2. Search for the sensor name in the Name field.
3. Select the link to open the record.
4. Locate the failing function or line using the stack trace, then correct the JavaScript.  
   For example, if the error indicates it "Cannot read property X of undefined", add a defensive check around the payload fields.
5. Select Update.

## What to do next

Rerun Discovery to verify the sensor no longer generates the error. If the error persists after applying the fix, contact ServiceNow Support and provide the full stack trace, the sensor name, and a description of the changes you made.
**Related tasks**   

* [Find the cause of a sensor error message](https://servicenow-prod.fluidtopics.net/2nOW~xoGc1LVVX8SeJG81A "Use this procedure to identify a Discovery sensor error.")
* [Find the cause of a "No Sensor Defined" error message](https://servicenow-prod.fluidtopics.net/NZ55aWZ6S7D67~BW_W1XbA "Every active probe looks for a corresponding sensor to process the data that is collected by the probe. The \"No Sensors Defined\" message indicates that the corresponding sensor for the probe is missing or inactive.")
* [Find the cause of a "Probe not found" error](https://servicenow-prod.fluidtopics.net/_iB3679AcTS~ZMLucLmRFg "Verify the correct sys_id of the probe associated with the probe parameter in the payload of the ECC Queue input record.")

*[\>]: and then


