Skip to content

Conversation

@RakeshBobba03
Copy link
Collaborator

@RakeshBobba03 RakeshBobba03 commented Oct 28, 2025

Fix #1387: Replace KeyError crash with user-friendly error messages for unsupported dataset formats
When users pointed the -d flag to folders containing unsupported file formats (like XLSX), CORE crashed with an unhelpful KeyError: 'XLSX' traceback. This fix adds early validation in core.py and list_dataset_metadata_handler.py to catch unsupported formats before they reach the service layer, displaying clear error messages like "No valid dataset files found. Supported formats: SAS V5 XPT or Dataset-JSON (JSON or NDJSON). Please ensure your directory contains files in one of these formats." The solution includes comprehensive regression tests, updated README documentation, and uses consistent constants across all files while maintaining backward compatibility for valid dataset files.

@RakeshBobba03 RakeshBobba03 marked this pull request as ready for review October 28, 2025 14:38
@RamilCDISC
Copy link
Collaborator

The ticket is clear from my side. Once @gerrycampion complete his review with the changes made on his request. I will put my closing comment and merge.

Copy link
Collaborator

@gerrycampion gerrycampion left a comment

Choose a reason for hiding this comment

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

minor issues, otherwise looks good

@gerrycampion gerrycampion merged commit a27eb27 into main Nov 5, 2025
11 checks passed
@gerrycampion gerrycampion deleted the 1387-improve-error branch November 5, 2025 18:46
@gerrycampion gerrycampion linked an issue Nov 18, 2025 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

4 participants