Add auto update for the app #173
Replies: 2 comments
-
|
Done in v1.3.7. The web UI now checks GitHub releases on startup and shows an Update available banner when a newer version is published. Clicking Update now runs Endpoints added: You'll see it the next time a release tag is newer than your local version. To test now, you can run |
Beta Was this translation helpful? Give feedback.
-
|
FastAPI delegates JSON decoding to Pydantic, which in turn uses the standard The The practical workaround is to add a custom exception handler that catches the raw decode error before Pydantic sees it. from fastapi import Request
from fastapi.responses import JSONResponse
import json
@app.exception_handler(json.JSONDecodeError)
async def json_decode_error_handler(request: Request, exc: json.JSONDecodeError):
return JSONResponse(
status_code=422,
content={
"detail": exc.msg,
"line": exc.lineno,
"column": exc.colno,
"position": exc.pos,
},
)This only catches errors that happen before Pydantic validation, so it covers malformed JSON bodies. Errors that pass JSON parsing but fail schema validation are a separate path and do not have line numbers because the input has already been decoded into a Python object. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
As the title say, we usually have new version, so i think something like auto-update worth it
Beta Was this translation helpful? Give feedback.
All reactions