Skip to content

Commit

Permalink
[+] App zone deletion error message CactuseSecurity#2597
Browse files Browse the repository at this point in the history
  • Loading branch information
SolidProgramming committed Nov 13, 2024
1 parent da1e93d commit 5adca48
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
5 changes: 5 additions & 0 deletions roles/database/files/sql/idempotent/fworch-texts.sql
Original file line number Diff line number Diff line change
Expand Up @@ -1541,6 +1541,8 @@ INSERT INTO txt VALUES ('remove_members', 'German', ': Mitglieder entfer
INSERT INTO txt VALUES ('remove_members', 'English', ': Remove Members');
INSERT INTO txt VALUES ('app_owner_not_found', 'German', 'Keinen Owner für diese App gefunden');
INSERT INTO txt VALUES ('app_owner_not_found', 'English', 'No owner found for this app');
INSERT INTO txt VALUES ('delete_app_zone', 'German', 'App Zone löschen');
INSERT INTO txt VALUES ('delete_app_zone', 'English', 'Delete App Zone');

-- compliance
INSERT INTO txt VALUES ('compliance', 'German', 'Compliance');
Expand Down Expand Up @@ -3067,6 +3069,9 @@ INSERT INTO txt VALUES ('E9017', 'English', 'Interface cannot replace requested
INSERT INTO txt VALUES ('E9101', 'German', 'Fehler bei externer Auftragserzeugung.');
INSERT INTO txt VALUES ('E9101', 'English', 'Error at external ticket creation.');

INSERT INTO txt VALUES ('E9201', 'German', 'Fehler beim löschen der existierenden App Zonen Objekte');
INSERT INTO txt VALUES ('E9201', 'English', 'Error deleting existing app zone objects');

-- errors from Api
INSERT INTO txt VALUES ('A0001', 'German', 'Ungültige Anmeldedaten. Nutzername darf nicht leer sein');
INSERT INTO txt VALUES ('A0001', 'English', 'Invalid credentials. Username must not be empty');
Expand Down
10 changes: 9 additions & 1 deletion roles/lib/files/FWO.Services/ModellingAppZoneHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using FWO.Api.Client.Data;
using FWO.Api.Client.Queries;
using System.Text.Json;
using System;

namespace FWO.Services
{
Expand Down Expand Up @@ -57,7 +58,14 @@ private async Task DeleteExistingAppZones(int ownerId)
{
foreach (ModellingAppZone existingAppZone in existingAppZones)
{
await apiConnection.SendQueryAsync<ReturnId>(ModellingQueries.deleteNwGroup, new { id = existingAppZone.Id });
try
{
await apiConnection.SendQueryAsync<ReturnId>(ModellingQueries.deleteNwGroup, new { id = existingAppZone.Id });
}
catch (Exception ex)
{
DisplayMessageInUi(ex, userConfig.GetText("delete_app_zone"), userConfig.GetText("E9201"), true);
}
}
}
}
Expand Down

0 comments on commit 5adca48

Please sign in to comment.