Skip to content

fix: improve error handling in BooleanBlocks#6137

Open
mishtiagrawal02-cloud wants to merge 9 commits intosugarlabs:masterfrom
mishtiagrawal02-cloud:fix-booleanblocks-error-handling
Open

fix: improve error handling in BooleanBlocks#6137
mishtiagrawal02-cloud wants to merge 9 commits intosugarlabs:masterfrom
mishtiagrawal02-cloud:fix-booleanblocks-error-handling

Conversation

@mishtiagrawal02-cloud
Copy link

Description

This PR improves error handling in BooleanBlocks.js.

Changes Made

  • Removed unnecessary console debug statements
  • Replaced console logging with activity.errorMsg
  • Added checks for missing block input connections
  • Used NOINPUTERRORMSG where appropriate for consistent error reporting

Why this change

Previously some blocks could fail silently or rely on console debugging.
This update ensures errors are handled consistently through the existing
activity.errorMsg system.

Files Modified

  • js/blocks/BooleanBlocks.js

Testing

  • Verified blocks still return correct boolean results
  • Checked that missing inputs trigger proper error messages

PR Category

  • Bug Fix
  • Feature
  • Performance
  • Tests
  • Documentation

@github-actions github-actions bot added the bug fix Fixes a bug or incorrect behavior label Mar 7, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 7, 2026

❌ Some Jest tests failed. Please check the logs and fix the issues before merging.

Failed Tests:

BooleanBlocks.test.js

@github-actions
Copy link
Contributor

github-actions bot commented Mar 7, 2026

✅ All Jest tests passed! This PR is ready to merge.

@Jetshree
Copy link
Contributor

Jetshree commented Mar 7, 2026

@mishtiagrawal02-cloud please don't change license header

@github-actions
Copy link
Contributor

github-actions bot commented Mar 7, 2026

✅ All Jest tests passed! This PR is ready to merge.

@mishtiagrawal02-cloud
Copy link
Author

@Jetshree Thanks for the feedback! I’ve reverted the commit that modified the license header and pushed the update. Please let me know if anything else needs to be changed.

@Jetshree
Copy link
Contributor

Jetshree commented Mar 7, 2026

@mishtiagrawal02-cloud in the file changes i can see that the license header is completely removed.

Copy link
Contributor

@vanshika2720 vanshika2720 left a comment

Choose a reason for hiding this comment

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

Thanks for the improvements to BooleanBlocks error handling.

However, the license header in BooleanBlocks.test.js appears to have been removed. Please restore it.

@mishtiagrawal02-cloud
Copy link
Author

@vanshika2720 Thanks for pointing that out! I've restored the original license header in BooleanBlocks.test.js. Please let me know if anything else needs to be updated.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 9, 2026

✅ All Jest tests passed! This PR is ready to merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug fix Fixes a bug or incorrect behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants