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

catch general exceptions #57

Open
yunchipang opened this issue May 15, 2024 · 0 comments
Open

catch general exceptions #57

yunchipang opened this issue May 15, 2024 · 0 comments

Comments

@yunchipang
Copy link
Owner

use the below code in all routers to handle internal server error. see example in routers/agency.py

# general exception handling, consider logging the error
except Exception as e:
        raise HTTPException(status_code=500, detail=str(e))
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

No branches or pull requests

1 participant