Skip to content

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

@harishsharma29

Description

@harishsharma29

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions