Details
-
Task
-
Resolution: Unresolved
-
P1: Critical
-
None
-
None
-
None
Description
For example:
this_api_response = Tools.createResponseOBJ(201, json_content=on_success_json) else: this_api_response = Tools.createResponseOBJ(400, {"status": "Failed", "message": "Cannot create user"})
can be replaced with:
raise HTTPException(status_code=400, detail="Cannot create user") # or provide dict in `detail` and it would be JSONed automatically