mirror of
https://github.com/openswarm-ai/openswarm.git
synced 2026-08-20 11:42:23 +02:00
12 lines
402 B
Python
12 lines
402 B
Python
"""Honest degraded mode: the bundle could not be fetched (or has no backend); every request says
|
|
so instead of crash-looping the VM."""
|
|
from fastapi import FastAPI
|
|
from fastapi.responses import JSONResponse
|
|
|
|
app = FastAPI()
|
|
|
|
|
|
@app.get("/{path:path}")
|
|
async def unavailable(path: str) -> JSONResponse:
|
|
return JSONResponse({"error": "this app's backend is not available right now"}, status_code=503)
|