Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

allowing for appResponse in http(s) errors

  • Loading branch information...
commit 85da2105889f86f6be4c01b1bddd4f69c30d33ed 1 parent b333eac
@mckelvey authored
Showing with 10 additions and 2 deletions.
  1. +5 −1 lib/class.instagram.coffee
  2. +5 −1 lib/class.instagram.js
View
6 lib/class.instagram.coffee
@@ -143,7 +143,11 @@ class InstagramAPI
if post_data?
request.write post_data
request.addListener 'error', (connectionException) ->
- error(connectionException, options, "_request") if connectionException.code isnt 'ENOTCONN'
+ if connectionException.code isnt 'ENOTCONN'
+ if appResponse?
+ error connectionException, options, "_request", appResponse
+ else
+ error connectionException, options, "_request"
request.end()
APIClient = new InstagramAPI
View
6 lib/class.instagram.js
@@ -190,7 +190,11 @@
if (post_data != null) request.write(post_data);
request.addListener('error', function(connectionException) {
if (connectionException.code !== 'ENOTCONN') {
- return error(connectionException, options, "_request");
+ if (appResponse != null) {
+ return error(connectionException, options, "_request", appResponse);
+ } else {
+ return error(connectionException, options, "_request");
+ }
}
});
return request.end();
Please sign in to comment.
Something went wrong with that request. Please try again.