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

error handlers + FastAgaveError #42

Merged
merged 11 commits into from
Oct 6, 2021
Merged

error handlers + FastAgaveError #42

merged 11 commits into from
Oct 6, 2021

Conversation

felipao-mx
Copy link
Member

closes #40
closes #41

@codecov
Copy link

codecov bot commented Sep 22, 2021

Codecov Report

Merging #42 (e8a3d07) into main (36caa5b) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##              main       #42   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            5         7    +2     
  Lines          148       169   +21     
  Branches        21        27    +6     
=========================================
+ Hits           148       169   +21     
Flag Coverage Δ
unittests 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
fast_agave/exc.py 100.00% <100.00%> (ø)
fast_agave/middlewares/__init__.py 100.00% <100.00%> (ø)
fast_agave/middlewares/error_handlers.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 36caa5b...e8a3d07. Read the comment docs.

@felipao-mx felipao-mx self-assigned this Sep 22, 2021
_: Request, exc: FastAgaveError
) -> JSONResponse:
return JSONResponse(
status_code=exc.status_code, content=dict(error=exc.detail)
Copy link
Contributor

Choose a reason for hiding this comment

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

Qué va a pasar cuando desde authed venga un CuencaError? Por ejemplo un UserNotLoggedInError

Copy link
Member Author

@felipao-mx felipao-mx Oct 5, 2021

Choose a reason for hiding this comment

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

Las excepciones que vengan de authed deben ser cachadas por el middleware en fast-agave-authed. Estos exceptions handlers solo manejan las que se lancen dentro de un endpoint. fast-agave-authed usa estos mismos exceptions handler

@felipao-mx felipao-mx merged commit 650abf3 into main Oct 6, 2021
@felipao-mx felipao-mx deleted the knox branch October 21, 2021 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Hacer más descriptible fast_agave.exc.Error agregar error handlers
2 participants