Skip to content

Commit

Permalink
docs: fix a typo in the custom exceptions documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
sansyrox committed Nov 26, 2024
1 parent ee507eb commit 6e9013d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs_src/src/pages/documentation/api_reference/exceptions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ Batman learned how to create custom error handlers for different exception types
```python {{ title: 'untyped' }}
@app.exception
def handle_exception(error):
return Response({status_code=500, body=f"error msg: {error}", headers={}})
return Response(status_code=500, description=f"error msg: {error}", headers={})
```

```python {{ title: 'typed' }}
@app.exception
def handle_exception(error: Exception):
return Response({status_code=500, body=f"error msg: {error}", headers={}})
return Response(status_code=500, description=f"error msg: {error}", headers={})
```
</CodeGroup>
</Col>
Expand Down

0 comments on commit 6e9013d

Please sign in to comment.