awtkns / fastapi-crudrouter

A dynamic FastAPI router that automatically creates CRUD routes for your models
https://fastapi-crudrouter.awtkns.com
MIT License
1.34k stars 156 forks source link

modified tortoise _get_one route #152

Closed Gabriel2409 closed 7 months ago

Gabriel2409 commented 2 years ago
vercel[bot] commented 2 years ago

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/flortz/fastapi-crudrouter/HGPPRrQ1qyUAZhgGVYciMPgDvbiM
✅ Preview: https://fastapi-crudrouter-git-fork-gabriel2409-feature-t-b5e00f-flortz.vercel.app

awtkns commented 2 years ago

Hi @Gabriel2409! Sorry for the delay in review! Thanks for this 🚀

vercel[bot] commented 2 years ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
fastapi-crudrouter ✅ Ready (Inspect) Visit Preview Jun 3, 2022 at 6:59AM (UTC)
Gabriel2409 commented 2 years ago

I added a commit to catch the tortoise DoesNotExist exception. However, I think this solution is not entirely satisfactory as the exception is caught even if add_exception_handler was set to True when registering tortoise. That means your custom error message will always be displayed, which might conflict with custom routes not created with fastapi crudrouter.