-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
Prevent throwing another exception if the request fails eg connection reset #715
Prevent throwing another exception if the request fails eg connection reset #715
Conversation
@@ -238,7 +238,7 @@ module {{moduleName}} | |||
tempfile.write(chunk) | |||
end | |||
request.on_complete do |response| | |||
tempfile.close | |||
tempfile.close if tempfile | |||
@config.logger.info "Temp file written to #{tempfile.path}, please copy the file to a proper folder "\ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Side note shouldn't there be a way to turn this off?
@davidvanlaatum the fix looks good to me. For |
disabling logging of info doesn't feel like the right way to do it. Feels more like a dev hint that should go away once its been seen |
for the build failure should I remove the 123_ that got added in a bunch of places? I assume thats a different problem |
No worry. Let me fix that. |
UPDATE: I've filed #719 to fix the Travis CI failure. |
@davidvanlaatum The fix has been merged into master. Thanks for your contribution. |
…ils eg connection reset (OpenAPITools#715) * prevent throwing another exception if the request fails eg connection reset * prevent throwing another exception if the request fails eg connection reset
PR checklist
./bin/
to update Petstore sample so that CIs can verify the change. (For instance, only need to run./bin/{LANG}-petstore.sh
and./bin/security/{LANG}-petstore.sh
if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in.\bin\windows\
.master
,4.0.x
. Default:master
.Description of the PR
#714 fix to prevent calling close on nil object
@cliffano @zlx