Skip to content

Conversation

@vagishdwivedi
Copy link

throwing error causes whole program to terminate as there's no way to catch it. If you return this error, client program can listen it like: client.ftp.on('error', callback) and act accordingly.
Example:

    client.connect(function() {
      console.log('connected to client');
      client.upload(request.body.fileName, request.body.uploadPath, {
            overwrite: 'older'
        }, function(result) {
        console.log(result);

        response.status(200).json(result);
      });
    });

    client.ftp.on('error', function(err) {
      console.log('--- client error: ', err);
    });

@vagishdwivedi
Copy link
Author

@noodny do you think it should be merged? Throwing error causes whole App to break, if we return then consumer app can handle it robustly.

bug fix for file download function.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant