File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
End_to_end_Solutions/AOAISearchDemo/app/data Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -205,7 +205,8 @@ def get_user_profile(user_id: str):
205205 else :
206206 return Response (response = json .dumps (user_profile .to_item ()), status = 200 )
207207 except Exception as e :
208- return Response (response = str (e ), status = 500 )
208+ logger .exception (f"get-user-profile: error: { e } " )
209+ return Response (response = "An internal server error occurred." , status = 500 )
209210
210211@app .route ('/user-profiles' , methods = ['GET' ])
211212def get_all_user_profiles ():
@@ -214,7 +215,8 @@ def get_all_user_profiles():
214215 json_user_profiles = [user_profile .to_item () for user_profile in user_profiles ]
215216 return Response (response = json .dumps (json_user_profiles ), status = 200 )
216217 except Exception as e :
217- return Response (response = str (e ), status = 500 )
218+ logger .exception (f"get-all-user-profiles: error: { e } " )
219+ return Response (response = "An internal server error occurred." , status = 500 )
218220
219221@app .route ('/user-groups/<group_id>' , methods = ['POST' ])
220222def create_user_group (group_id : str ):
You can’t perform that action at this time.
0 commit comments