From 9f9ef4e99d4ceece4f7a7877fb4057ac7a512110 Mon Sep 17 00:00:00 2001 From: MrWaradana Date: Fri, 13 Feb 2026 13:34:15 +0700 Subject: [PATCH] remove starletteHTTPException --- src/main.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/main.py b/src/main.py index b9855aa..407f5b0 100644 --- a/src/main.py +++ b/src/main.py @@ -15,7 +15,6 @@ from slowapi import _rate_limit_exceeded_handler from slowapi.errors import RateLimitExceeded from sqlalchemy import inspect from sqlalchemy.exc import SQLAlchemyError -from starlette.exceptions import StarletteHTTPException from sqlalchemy.orm import scoped_session from sqlalchemy.ext.asyncio import async_scoped_session from starlette.middleware.base import BaseHTTPMiddleware, RequestResponseEndpoint @@ -50,7 +49,6 @@ app.state.limiter = limiter # we define the exception handlers app.add_exception_handler(Exception, handle_exception) app.add_exception_handler(HTTPException, handle_exception) -app.add_exception_handler(StarletteHTTPException, handle_exception) app.add_exception_handler(RequestValidationError, handle_exception) app.add_exception_handler(RateLimitExceeded, _rate_limit_exceeded_handler) app.add_exception_handler(SQLAlchemyError, handle_exception)