Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix TypeError for undefined response properties in InfluxDBReporter #48

Merged
merged 2 commits into from
Aug 1, 2024

Conversation

vs4vijay
Copy link
Owner

@vs4vijay vs4vijay commented Aug 1, 2024

Related to #41

Add a check to handle undefined response properties in InfluxDBReporter.request function.

  • Add a check to ensure args.response is defined before accessing its properties.
  • Log an error message and skip the current request if args.response is undefined.

Related to #41

Add a check to handle undefined response properties in `InfluxDBReporter.request` function.

* Add a check to ensure `args.response` is defined before accessing its properties.
* Log an error message and skip the current request if `args.response` is undefined.
@@ -87,6 +87,11 @@ class InfluxDBReporter {

console.log(`[${this.context.currentItem.index}] Running ${item.name}`);

if (!args.response) {
console.log(`[-] ERROR: Response is undefined for request ${item.name}`);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'console' is not defined.
'template literal syntax' is only available in ES6 (use 'esversion: 6').

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kuch bhi

Copy link

sonarqubecloud bot commented Aug 1, 2024

@vs4vijay vs4vijay merged commit 6856f21 into develop Aug 1, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant