Skip to content

Commit ee13aeb

Browse files
committed
📝 Add clear error message for missing route tags in app/main.py.
1 parent 8bf0025 commit ee13aeb

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

backend/app/main.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@
88

99

1010
def custom_generate_unique_id(route: APIRoute) -> str:
11+
if not route.tags:
12+
raise ValueError(
13+
f"Route '{route.name}' is missing a tag. Each route "
14+
"must have at least one tag for client generation."
15+
)
1116
return f"{route.tags[0]}-{route.name}"
1217

1318

0 commit comments

Comments
 (0)