Virtual machines are not getting fetched through service accounts

Community Alums
Not applicable

Hi Team,

 

Through some of the cloud service accounts the VM's are not getting fetched, its throwing below pattern error:

JPRamyaPriya_0-1726930708165.png

JPRamyaPriya_1-1726930747092.png

 

How to approach on this? Could anyone suggest me.

Any help is appreciated!

Thanks in advance!

3 REPLIES 3

Rajesh Chopade1
Mega Sage

Hi @Community Alums 

The error message you’re seeing suggests that there's an issue with how your code is handling data—specifically, it appears to be trying to parse an object that is null.

 

Ensure that the cloud service is returning the expected data. Use logging or debugging tools to check what data you are receiving.

 

Look for any cases where the data might be null or undefined.

 

Add checks in your code to handle cases where the data could be null. For instance

 

if (data && typeof data === 'object') {
    // Proceed with parsing
} else {
    console.error('Data is null or not an object:', data);
}

 

 

Use console logs or breakpoints to see the flow of your code and inspect the variables leading up to the error.

 

Identify the exact line where the error occurs and examine the context around it.

 

Implement better error handling to catch exceptions and provide more meaningful error messages.

 

try {
    // Code that might throw an error
} catch (error) {
    console.error('An error occurred:', error.message);
}

 

 

If you're fetching data asynchronously, ensure that you're waiting for the data to be fully available before trying to parse it.

 

I hope my answer helps you to resolve your issue, if yes please mark my answer helpful and correct.

thank you

rajesh

Community Alums
Not applicable

Thanks @Rajesh Chopade1.

 

I used debug tool, and it thrown below error, how to approach to resolve this error:

JPRamyaPriya_0-1726936412039.png

 

SK Chand Basha
Giga Sage

Hi @Community Alums 

 

Can you compare the pattern code with the your PDI pattern might be changes .