This commit is contained in:
2026-06-13 20:00:45 +08:00
parent 09f12c6c47
commit 2bcaab1626
6 changed files with 167 additions and 2 deletions
+2
View File
@@ -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: