pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/fastapi/full-stack-fastapi-template/pull/2244

c0a1f3e0.css" /> 📝 Add clear error message for missing route tags in `app/main.py`. by rxxbyy · Pull Request #2244 · fastapi/full-stack-fastapi-template · GitHub
Skip to content

📝 Add clear error message for missing route tags in app/main.py.#2244

Open
rxxbyy wants to merge 1 commit intofastapi:masterfrom
rxxbyy:fix/route-tag-validation
Open

📝 Add clear error message for missing route tags in app/main.py.#2244
rxxbyy wants to merge 1 commit intofastapi:masterfrom
rxxbyy:fix/route-tag-validation

Conversation

@rxxbyy
Copy link
Copy Markdown

@rxxbyy rxxbyy commented Mar 25, 2026

Added a guard statement with a clear error message when a route is missing tags.

Currently, when you miss setting up a tag you get an error like:

return f"{route.tags[0]}-{route.name}"
          ~~~~~~~~~~^^^
IndexError: list index out of range

With the proposed changes, the developer sees:

ValueError: Route 'my_new_route' is missing a tag. Each route must have at least one tag for client generation.

I believe this improves developer experience and saves debugging time for anyone using the template.
Thank you!

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.

2 participants

pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy