通知
This commit is contained in:
@@ -18,6 +18,7 @@ from starlette.exceptions import HTTPException as StarletteHTTPException
|
||||
|
||||
from app.api.routes.health import router as health_router
|
||||
from app.api.routes.scrape import router as scrape_router
|
||||
from app.api.routes.news import router as news_router
|
||||
from app.core.config import get_settings
|
||||
from app.core.container import ServiceContainer
|
||||
from app.core.errors import AppError
|
||||
@@ -90,6 +91,7 @@ def create_app() -> FastAPI:
|
||||
app = FastAPI(title="Surugaya Scraper Service", lifespan=lifespan)
|
||||
app.include_router(health_router)
|
||||
app.include_router(scrape_router)
|
||||
app.include_router(news_router)
|
||||
|
||||
@app.exception_handler(AppError)
|
||||
async def app_error_handler(_: Request, exc: AppError) -> JSONResponse:
|
||||
|
||||
Reference in New Issue
Block a user