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

Handle invalid parameter values #130

Merged
merged 4 commits into from
Nov 25, 2024
Merged

Handle invalid parameter values #130

merged 4 commits into from
Nov 25, 2024

Conversation

jdudley1123
Copy link
Member

Context

Previously invalid parameter values for date, day, and pollutant would cause errors.

Changes in this PR

This PR adds error handling with fallbacks for date, day, and pollution. Date and day fallback to today, pollution falls back to 'Total' (ie all pollution).

We can move the repeated allow statement to the before block to DRY up the test.
Previously we were throwing an error here. Now we catch it and default to today's date.
Previously we were throwing an error here. Now we default to today instead.
Previously the value would be passed to the map unchanged and cause problems there. Now we default to total pollution instead.
@jdudley1123 jdudley1123 merged commit 49f6d69 into develop Nov 25, 2024
2 checks passed
@jdudley1123 jdudley1123 deleted the error-handling-2 branch November 25, 2024 16:58
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