Skip to content

Commit

Permalink
bug: fix router in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Mr-Sunglasses committed Jun 10, 2024
1 parent 5bdc042 commit 0fab8e6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs_src/src/pages/documentation/api_reference/exceptions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Batman learned how to handle the error for different exception in his applicatio
</Col>
<Col sticky>

<CodeGroup title="Request" tag="GET" label="/items/{item_id}">
<CodeGroup title="Request" tag="GET" label="/hello_world/{item_id}">

```python {{ title: 'untyped' }}
from robyn import Robyn, HTTPException, status_codes
Expand All @@ -16,7 +16,7 @@ Batman learned how to handle the error for different exception in his applicatio

items = {"foo": "The Foo Wrestlers"}

@app.get("/items/{item_id}")
@app.get("/hello_world/{item_id}")
async def read_item(request, item_id):
if item_id not in items:
raise HTTPException(status_code=status_codes.HTTP_404_NOT_FOUND, detail="Item not found")
Expand All @@ -32,7 +32,7 @@ Batman learned how to handle the error for different exception in his applicatio
items: Dict[str, str] = {"foo": "The Foo Wrestlers"}


@app.get("/items/{item_id}")
@app.get("/hello_world/{item_id}")
async def read_item(request: Request, item_id: str) -> Dict[str, str]:
if item_id not in items:
raise HTTPException(status_code=status_codes.HTTP_404_NOT_FOUND, detail="Item not found")
Expand Down

0 comments on commit 0fab8e6

Please sign in to comment.