feat(api): standardize V3 error status codes and documentation
- Updated V3 CRUD routers to return 400 Bad Request for database schema errors (unknown columns) across all list and search endpoints. - Fixed serialization issue in nested patch endpoint. - Overhauled Section 7 of Frontend Integration Guide to document HTTP status code mappings for common error categories.
This commit is contained in:
@@ -310,7 +310,7 @@ async def patch_child_obj(
|
||||
return mk_resp(data=True, response=response, status_message="Updated successfully.")
|
||||
else:
|
||||
db_err = format_db_error(get_last_sql_error())
|
||||
return mk_resp(data=False, status_code=400, response=response, status_message="Update failed.", details=db_err)
|
||||
return mk_resp(data=False, status_code=400, response=response, status_message="Update failed.", details=db_err.dict())
|
||||
|
||||
|
||||
@router.delete('/{parent_obj_type}/{parent_obj_id}/{child_obj_type}/{child_obj_id}', response_model=Resp_Body_Base)
|
||||
|
||||
Reference in New Issue
Block a user