Closed adg-mh closed 1 year ago
This issue was raised before: https://github.com/alexschimpf/fastapi-versionizer/issues/1
Does that help?
Yes, it does. Absolutely can't believe I missed that given it was 1 of only 3 existing issues. Sorry for the noise and thank you for the quick reply.
Using the example below, exceptions are not printed when both
versionize
andapp.middleware
are used. If you comment eitherversionize
orapp.middleware
sections, stack traces are printed.Example code
```python from fastapi import FastAPI, Response, Request from fastapi_versionizer.versionizer import versionize app = FastAPI(title="My Versioned API") @app.middleware("http") async def test_middleware(request: Request, call_next): response: Response = await call_next(request) return response @app.get("/do_something") async def do_something(): 1 / 0 return Response(content="response") versions = versionize( app=app, prefix_format='/v{major}', docs_url='/docs', redoc_url='/redoc' ) ```