File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -129,12 +129,12 @@ async def delete_todo(id: str):
129
129
try :
130
130
# Attempt to delete the item using only the partition key (`id`)
131
131
response = table .delete_item (Key = {"id" : id }) # Using only `id` to identify the item
132
-
132
+
133
133
# Check if the HTTP status code indicates a successful deletion
134
134
if response .get ("ResponseMetadata" , {}).get ("HTTPStatusCode" ) != 200 :
135
135
logging .warning (f"Delete operation failed for id { id } : { response } " )
136
136
raise HTTPException (status_code = 404 , detail = "Todo not found" )
137
-
137
+
138
138
logging .debug (f"Deleted item with id: { id } " )
139
139
return {"detail" : "Todo deleted successfully" }
140
140
@@ -149,8 +149,8 @@ async def delete_todo(id: str):
149
149
@app .get ("/health" )
150
150
async def health ():
151
151
try :
152
- logging .debug ("Health check initiated" )
153
- return {"message" : "Everything looks good!" }
152
+ logging .debug ("Welcoome, Health check initiated" )
153
+ return {"message" : "Welcoome, Everything looks good!" }
154
154
except Exception as e :
155
155
logging .error (f"Health check error: { e } " )
156
156
raise HTTPException (status_code = 500 , detail = "Error performing health check" )
You can’t perform that action at this time.
0 commit comments