agrc / masquerade

Disguise UGRC's Web API endpoints as an Esri locator service.
https://github.com/agrc/masquerade#readme
MIT License
1 stars 0 forks source link

fix: handle invalid magicKey values #84

Closed stdavis closed 1 year ago

stdavis commented 1 year ago

I've seen a few requests come in with strange magic keys that are causing 500 errors. This commit handles those situations and returns a helpful error message with a 400 status code.

codecov[bot] commented 1 year ago

Codecov Report

Base: 85.39% // Head: 85.48% // Increases project coverage by +0.09% :tada:

Coverage data is based on head (23f6b07) compared to base (3566873). Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## dev #84 +/- ## ========================================== + Coverage 85.39% 85.48% +0.09% ========================================== Files 3 3 Lines 315 317 +2 Branches 33 32 -1 ========================================== + Hits 269 271 +2 Misses 40 40 Partials 6 6 ``` | [Impacted Files](https://codecov.io/gh/agrc/masquerade/pull/84?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=agrc) | Coverage Δ | | |---|---|---| | [src/masquerade/main.py](https://codecov.io/gh/agrc/masquerade/pull/84/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=agrc#diff-c3JjL21hc3F1ZXJhZGUvbWFpbi5weQ==) | `68.62% <100.00%> (+0.62%)` | :arrow_up: | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=agrc). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=agrc)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.