From 2a82d3d70c2f85c99aa7e103fd1caf478f3d3ee8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20H=C3=A5land?= Date: Tue, 24 Oct 2023 12:52:44 +0200 Subject: [PATCH] removed unwanted changes --- .../Controllers/Utilities/UtilitiesController.cs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/backend/api/Fusion.Resources.Api/Controllers/Utilities/UtilitiesController.cs b/src/backend/api/Fusion.Resources.Api/Controllers/Utilities/UtilitiesController.cs index 9ddbba03d..f61125f91 100644 --- a/src/backend/api/Fusion.Resources.Api/Controllers/Utilities/UtilitiesController.cs +++ b/src/backend/api/Fusion.Resources.Api/Controllers/Utilities/UtilitiesController.cs @@ -45,8 +45,7 @@ public async Task> ValidateContractorImportSpreads if (string.IsNullOrEmpty(url)) - return ApiErrors.InvalidOperation( - new InvalidOperationException("Missing configuration for fusion utility function")); + throw new InvalidOperationException("Missing configuration for fusion utility function"); using var streamContent = new StreamContent(request.File!.OpenReadStream()); @@ -60,9 +59,8 @@ public async Task> ValidateContractorImportSpreads if (response.IsSuccessStatusCode) return JsonConvert.DeserializeObject(content)!; - return ApiErrors.InvalidOperation( - new InvalidOperationException( - $"Parser function returned non-successfull response ({response.StatusCode}).")); + throw new InvalidOperationException( + $"Parser function returned non-successfull response ({response.StatusCode})."); } [HttpGet("/utilities/templates/import-personnel")]