Skip to content

Commit 386a36d

Browse files
committed
Docs update
1 parent 7dba821 commit 386a36d

File tree

4 files changed

+10
-9
lines changed

4 files changed

+10
-9
lines changed

docs/usage/custom_codes.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ The `BaseExceptionCode` in **APIException** gives you a simple pattern to organi
2121
Create your own class by extending `BaseExceptionCode` and declare your error codes once:
2222

2323
```python
24-
from APIException import BaseExceptionCode
24+
from api_exception import BaseExceptionCode
2525

2626
class CustomExceptionCode(BaseExceptionCode):
2727
# Format: KEY = (code, message, description)
@@ -34,7 +34,7 @@ class CustomExceptionCode(BaseExceptionCode):
3434
Raise your custom error with full `typing`, `logging`, and `standardized` response:
3535

3636
```python
37-
from APIException import APIException
37+
from api_exception import APIException
3838

3939
raise APIException(
4040
error_code=CustomExceptionCode.USER_NOT_FOUND,

docs/usage/fallback.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ When you call `register_exception_handlers()`, just pass `use_fallback_middlewar
2020

2121
```python
2222
from fastapi import FastAPI
23-
from APIException import register_exception_handlers
23+
from api_exception import register_exception_handlers
2424

2525
app = FastAPI()
2626

docs/usage/quick_start.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ pip install apiexception
1313
Add the register_exception_handlers to your FastAPI app to automatically handle and standardize your responses:
1414

1515
```python
16-
from APIException import register_exception_handlers
16+
from api_exception import register_exception_handlers
1717
from fastapi import FastAPI
1818

1919
app = FastAPI()
@@ -28,8 +28,9 @@ Your API now returns consistent success & error responses, and unexpected server
2828
Here’s a minimal example:
2929
```python
3030
from fastapi import FastAPI, Path
31-
from APIException import APIException, ExceptionStatus, register_exception_handlers, ResponseModel, APIResponse, BaseExceptionCode
3231
from pydantic import BaseModel, Field
32+
from api_exception import APIException, register_exception_handlers, ResponseModel, APIResponse, BaseExceptionCode
33+
3334

3435
app = FastAPI()
3536

docs/usage/register_exception_handlers.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ Header: `Content-Type: application/problem+json`
9696

9797
```python
9898
from fastapi import FastAPI
99-
from APIException import register_exception_handlers
99+
from api_exception import register_exception_handlers
100100

101101
app = FastAPI()
102102
register_exception_handlers(app)
@@ -113,7 +113,7 @@ register_exception_handlers(app)
113113

114114
### Production with file logging and quieter handled errors
115115
```python
116-
from APIException import register_exception_handlers, add_file_handler, logger
116+
from api_exception import register_exception_handlers, add_file_handler, logger
117117

118118
add_file_handler("prod_errors.log")
119119
register_exception_handlers(
@@ -126,7 +126,7 @@ logger.setLevel("WARNING")
126126

127127
### RFC 7807 outputs
128128
```python
129-
from APIException import register_exception_handlers
129+
from api_exception import register_exception_handlers
130130
from custom_enum.enums import ResponseFormat
131131

132132
register_exception_handlers(
@@ -161,7 +161,7 @@ register_exception_handlers(
161161
```python
162162
from fastapi import FastAPI, Path
163163
from pydantic import BaseModel
164-
from APIException import (
164+
from api_exception import (
165165
APIException, register_exception_handlers, ResponseModel,
166166
BaseExceptionCode, APIResponse
167167
)

0 commit comments

Comments
 (0)