Skip to content

Commit 48f17f6

Browse files
committed
Phase 2: Remove last defensive ImportError block for rate limiting
1 parent ca1934f commit 48f17f6

File tree

1 file changed

+7
-14
lines changed

1 file changed

+7
-14
lines changed

backend/app.py

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -101,20 +101,13 @@
101101
# =============================================================================
102102
# Import rate limiters to prevent API abuse
103103
# See services/middleware.py for configuration
104-
try:
105-
from services.middleware import (
106-
post_generation_limiter,
107-
publish_limiter,
108-
api_limiter,
109-
RateLimitExceededError
110-
)
111-
RATE_LIMITING_ENABLED = True
112-
except ImportError:
113-
RATE_LIMITING_ENABLED = False
114-
post_generation_limiter = None
115-
publish_limiter = None
116-
api_limiter = None
117-
RateLimitExceededError = Exception
104+
from services.middleware import (
105+
post_generation_limiter,
106+
publish_limiter,
107+
api_limiter,
108+
RateLimitExceededError
109+
)
110+
RATE_LIMITING_ENABLED = True
118111

119112
# =============================================================================
120113
# ENVIRONMENT VALIDATION

0 commit comments

Comments
 (0)