Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use string.Empty rather than null as the default response text when throwing exceptions #2505

merged 1 commit into from Nov 4, 2019


Copy link

Numpsy commented Nov 4, 2019

refs #2335 - I was seeing a NullReferenceException due to responseText_ being set to null when the response had no content, and the construtor for ApiException trying to call Substring on the null value.

Defaulting responseText_ to string.Empty instead of null seems to avoid that ok (same idea as the change made for #2268)

@RicoSuter RicoSuter merged commit a0a2c21 into RicoSuter:master Nov 4, 2019
1 check passed
1 check passed
NSwag - CI Build #20191104.6 succeeded
@Numpsy Numpsy deleted the Numpsy:rw/2335 branch Nov 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.