Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions custom_templates/Configuration.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};

Expand Down
1 change: 1 addition & 0 deletions openapi-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ packageName: Bandwidth.Standard
packageTags: Bandwidth
targetFramework: netstandard2.0
templateDir: custom_templates
packageGuid: "{0B827FE6-C4E9-4144-A195-8A00B3C063F4}"
5 changes: 5 additions & 0 deletions src/Bandwidth.Standard/Client/Configuration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};

Expand Down
Loading