amadeus-node icon indicating copy to clipboard operation
amadeus-node copied to clipboard

It does log error message in console even the API call finishes with success status code.

Open harishsharma29 opened this issue 6 months ago • 1 comments

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch [email protected] for the project I'm working on.

Here is the diff that solved my problem:

diff --git a/node_modules/amadeus/lib/amadeus/client/listener.js b/node_modules/amadeus/lib/amadeus/client/listener.js
index ea05aa6..e49953f 100644
--- a/node_modules/amadeus/lib/amadeus/client/listener.js
+++ b/node_modules/amadeus/lib/amadeus/client/listener.js
@@ -48,7 +48,6 @@ var Listener = /*#__PURE__*/function () {
       var response = new _response["default"](http_response, this.request);
       http_response.on('data', response.addChunk.bind(response));
       http_response.on('end', this.onEnd(response).bind(this));
-      http_response.on('close', this.onNetworkError(response).bind(this));
       http_response.on('error', this.onNetworkError(response).bind(this));
     }
 

This issue body was partially generated by patch-package.

harishsharma29 avatar Dec 30 '23 08:12 harishsharma29