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

Use Flask error handlers instead of decorators (#74) #227

Merged
merged 2 commits into from
Aug 6, 2021

Conversation

nickeopti
Copy link
Contributor

Closes #74

@nickeopti nickeopti requested a review from j08lue August 6, 2021 12:21
@codecov
Copy link

codecov bot commented Aug 6, 2021

Codecov Report

Merging #227 (2b90eeb) into main (c1c5b56) will decrease coverage by 0.00%.
The diff coverage is 85.71%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #227      +/-   ##
==========================================
- Coverage   98.46%   98.46%   -0.01%     
==========================================
  Files          45       45              
  Lines        2221     2211      -10     
  Branches      278      276       -2     
==========================================
- Hits         2187     2177      -10     
  Misses         19       19              
  Partials       15       15              
Impacted Files Coverage Δ
terracotta/server/flask_api.py 90.27% <80.95%> (ø)
terracotta/server/colormap.py 97.22% <100.00%> (-0.08%) ⬇️
terracotta/server/compute.py 100.00% <100.00%> (ø)
terracotta/server/datasets.py 100.00% <100.00%> (ø)
terracotta/server/keys.py 100.00% <100.00%> (ø)
terracotta/server/metadata.py 100.00% <100.00%> (ø)
terracotta/server/rgb.py 96.07% <100.00%> (-0.15%) ⬇️
terracotta/server/singleband.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c1c5b56...2b90eeb. Read the comment docs.

Copy link
Collaborator

@j08lue j08lue left a comment

Choose a reason for hiding this comment

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

This nicely tidies up the code base. Looks good to me! I am pretty sure we cover all the exceptions (and their expected error codes) in the tests, so this seems to work as expected.

@dionhaefner, do you want to take a brief look at it to verify that this is what you had in mind?

@dionhaefner
Copy link
Collaborator

LGTM 👍

@j08lue j08lue merged commit 1037297 into main Aug 6, 2021
@j08lue j08lue deleted the flask-error-handlers branch August 6, 2021 17:47
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.

Use Flask error handlers instead of convert_exceptions decorator
3 participants