From 9af0064d1b53afc4d915f67434619c57e016620b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 28 Feb 2026 02:57:45 +0000 Subject: [PATCH 1/2] Initial plan From d0f7fe11f031d7a6c76ea272addb163681d79d56 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 28 Feb 2026 03:01:36 +0000 Subject: [PATCH 2/2] US-003 - Capture HTTP response status in PostAsJsonAsync calls Co-authored-by: m-GDEV <65223925+m-GDEV@users.noreply.github.com> --- .../Services/Implementation/ApiService.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/WardrobeManager.Presentation/Services/Implementation/ApiService.cs b/WardrobeManager.Presentation/Services/Implementation/ApiService.cs index 38f63ec..2a90f5d 100644 --- a/WardrobeManager.Presentation/Services/Implementation/ApiService.cs +++ b/WardrobeManager.Presentation/Services/Implementation/ApiService.cs @@ -30,12 +30,14 @@ public async Task> GetAllClothingItemsAsync() public async Task AddNewClothingItemAsync(NewClothingItemDTO newNewClothingItem) { - await _httpClient.PostAsJsonAsync("/clothing/add", newNewClothingItem); + var response = await _httpClient.PostAsJsonAsync("/clothing/add", newNewClothingItem); + response.EnsureSuccessStatusCode(); } public async Task DeleteClothingItemAsync(int itemId) { - await _httpClient.PostAsJsonAsync("/clothing/delete", itemId); + var response = await _httpClient.PostAsJsonAsync("/clothing/delete", itemId); + response.EnsureSuccessStatusCode(); } #endregion