Skip to content

Validate solver input and return readable errors instead of tracebacks - #24

Merged
Davbp24 merged 1 commit into
mainfrom
shawn/solver-validation
Nov 29, 2026
Merged

Davbp24 merged 1 commit into
mainfrom
shawn/solver-validation

Conversation

@561shawn

Copy link
Copy Markdown
Collaborator

-Validates solver input before solving: required fields, date format, rules, 24-hour times, shift order, duplicate ids, empty server/show lists.

-Bad input exits with a readable message on stderr (e.g. "Can't build the schedule: Server B has an invalid shift_end '7:00pm'"), which runSolver already passes through as res.error, so no UI or bridge changes are needed.

-Unexpected errors return a one-line message instead of a Python traceback.

-Adds 11 validation test cases.

@Davbp24 Davbp24 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

merged

@Davbp24
Davbp24 merged commit fef7169 into main Nov 29, 2026
1 check 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.

2 participants