ZeroIntensity / view.py

The Batteries-Detachable Web Framework
https://view.zintensity.dev
MIT License
206 stars 15 forks source link

More detailed error 400's #51

Open ZeroIntensity opened 10 months ago

ZeroIntensity commented 10 months ago

Right now, it just says "Bad Request". Some other information could probably be added (at least for debug mode).

ZeroIntensity commented 7 months ago

Example API, could integrate with #95

from view import new_app

app = new_app()

@app.get("/")
async def index():
    ...

@app.error(400)
@context
async def error(ctx: Context):
    ...
ZeroIntensity commented 5 months ago

Partially implemented by #137