From 5aa4401e4490fa591b7c145fc2a690cc428a90fc Mon Sep 17 00:00:00 2001 From: Amolith Date: Thu, 16 Apr 2026 11:31:04 -0600 Subject: [PATCH] Treat already-set PIN err as success --- lib/bandwidth_tn_options.rb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/bandwidth_tn_options.rb b/lib/bandwidth_tn_options.rb index 0597c7d4580f881edc93e51d5fa4b521fe3f32a0..5be6c1ca32a74dc383e56ec0b3d61675ea975f55 100644 --- a/lib/bandwidth_tn_options.rb +++ b/lib/bandwidth_tn_options.rb @@ -75,7 +75,14 @@ class BandwidthTNOptions end EMPromise.resolve(nil).then do - order = BandwidthIris::TnOptions.get_tn_option_order(client, order_id) + begin + order = BandwidthIris::TnOptions.get_tn_option_order(client, order_id) + rescue BandwidthIris::Errors::GenericError => e + raise unless e.code == 5195 # Same PIN already set + + # So treat as success + next true + end warnings = order[:warnings] if warnings&.any?