From f3a571b664e2c9ed0674d129ac6369f483a683c9 Mon Sep 17 00:00:00 2001 From: Joseph Doherty Date: Sun, 24 May 2026 07:34:33 -0400 Subject: [PATCH] fix(centralui): swallow ArgumentException in TransportImport upload step OnFileSelectedAsync called TryLoadAsync with a null passphrase to peek the manifest, but the outer `catch (Exception)` surfaced the expected "Passphrase required for encrypted bundle" ArgumentException as a fatal "Failed to read bundle" error -- blocking the user from ever advancing to the passphrase step. Catch ArgumentException specifically and let the wizard advance normally on the next click. --- .../Components/Pages/Design/TransportImport.razor.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/ScadaLink.CentralUI/Components/Pages/Design/TransportImport.razor.cs b/src/ScadaLink.CentralUI/Components/Pages/Design/TransportImport.razor.cs index ace4412..b6078b3 100644 --- a/src/ScadaLink.CentralUI/Components/Pages/Design/TransportImport.razor.cs +++ b/src/ScadaLink.CentralUI/Components/Pages/Design/TransportImport.razor.cs @@ -126,6 +126,11 @@ public partial class TransportImport : ComponentBase await TryLoadAsync(passphrase: null); } + catch (ArgumentException) + { + // Encrypted bundle, no passphrase yet — expected. The wizard + // advances to the passphrase step when the user clicks Next. + } catch (Exception ex) { _errorMessage = $"Failed to read bundle: {ex.Message}";