-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Which feature or component needs enhancement?
All request handlers associated with routes.
Describe the current behavior
There are route handlers that only have the happy path of a request handling flow.
For instance
kaapi-guardrails/backend/app/api/routes/ban_lists.py
Lines 14 to 27 in 1d62fc2
| @router.post( | |
| "/", | |
| description=load_description("ban_lists/create_ban_list.md"), | |
| response_model=APIResponse[BanListResponse], | |
| ) | |
| def create_ban_list( | |
| payload: BanListCreate, | |
| session: SessionDep, | |
| auth: MultitenantAuthDep, | |
| ): | |
| ban_list = ban_list_crud.create( | |
| session, payload, auth.organization_id, auth.project_id | |
| ) | |
| return APIResponse.success_response(data=ban_list) |
Describe the enhancement you'd like
Finalize a syntax for status response messages and the amount of information to include in them and start adding some exception handlers to the request handler functions.
Why is this enhancement needed?
The kaapi team and any downstream API users of kaapi API will get meaningful error messages.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request