From 67756fda118d91f182505335c358f07c732ef9a7 Mon Sep 17 00:00:00 2001 From: ckoegel Date: Thu, 17 Sep 2026 15:57:21 -0400 Subject: [PATCH 1/2] SWI-12730 Fix Silent Null Swallowing --- custom_templates/Configuration.mustache | 4 +--- src/Bandwidth.Standard/Client/Configuration.cs | 5 +++++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/custom_templates/Configuration.mustache b/custom_templates/Configuration.mustache index c6e4b432..b7a4df25 100644 --- a/custom_templates/Configuration.mustache +++ b/custom_templates/Configuration.mustache @@ -56,13 +56,11 @@ namespace {{packageName}}.Client string.Format("Error calling {0}: {1}", methodName, response.RawContent), response.RawContent, response.Headers); } - {{^netStandard}} - if (status == 0) + if (status == 0 || !string.IsNullOrEmpty(response.ErrorText)) { return new ApiException(status, string.Format("Error calling {0}: {1}", methodName, response.ErrorText), response.ErrorText); } - {{/netStandard}} return null; }; diff --git a/src/Bandwidth.Standard/Client/Configuration.cs b/src/Bandwidth.Standard/Client/Configuration.cs index 603438e5..7d645de5 100644 --- a/src/Bandwidth.Standard/Client/Configuration.cs +++ b/src/Bandwidth.Standard/Client/Configuration.cs @@ -60,6 +60,11 @@ public class Configuration : IReadableConfiguration string.Format("Error calling {0}: {1}", methodName, response.RawContent), response.RawContent, response.Headers); } + if (status == 0 || !string.IsNullOrEmpty(response.ErrorText)) + { + return new ApiException(status, + string.Format("Error calling {0}: {1}", methodName, response.ErrorText), response.ErrorText); + } return null; }; From 3e943138f9e927db56b248bd7086d137c768e3b7 Mon Sep 17 00:00:00 2001 From: ckoegel Date: Thu, 17 Sep 2026 16:14:46 -0400 Subject: [PATCH 2/2] pin guid --- openapi-config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/openapi-config.yml b/openapi-config.yml index 819e9a45..90fa25f7 100644 --- a/openapi-config.yml +++ b/openapi-config.yml @@ -3,3 +3,4 @@ packageName: Bandwidth.Standard packageTags: Bandwidth targetFramework: netstandard2.0 templateDir: custom_templates +packageGuid: "{0B827FE6-C4E9-4144-A195-8A00B3C063F4}"