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?