Skip to content

Commit

Permalink
api 404
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelcolvin committed Nov 30, 2023
1 parent bd4fc47 commit 2906ea1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions python/demo/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,3 +248,9 @@ async def sse_generator() -> AsyncIterable[str]:
@router.get('/sse')
async def sse_experiment() -> StreamingResponse:
return StreamingResponse(sse_generator(), media_type='text/event-stream')


@router.get('/{path:path}')
async def api_404():
# so we don't fall through to the index page
return {'message': 'Not Found'}

0 comments on commit 2906ea1

Please sign in to comment.