diff --git a/fabric-client/lib/Orderer.js b/fabric-client/lib/Orderer.js index 4c9c3c3bd0..85658c82d1 100644 --- a/fabric-client/lib/Orderer.js +++ b/fabric-client/lib/Orderer.js @@ -107,17 +107,12 @@ var Orderer = class extends Remote { broadcast.on('data', function (response) { logger.debug('sendBroadcast - on data response: %j', response); broadcast.end(); - if(response.info) { + if(response && response.info) { logger.debug('sendBroadcast - response info :: %s', response.info); } - if(response.status) { - if (response.status === 'SUCCESS') { - logger.debug('sendBroadcast - resolve with %s', response.status); - return resolve(response); - } else { - logger.error('sendBroadcast - reject with %s', response.status); - return reject(new Error(response.status)); - } + if(response && response.status) { + logger.debug('sendBroadcast - response status %s', response.status); + return resolve(response); } else { logger.error('sendBroadcast ERROR - reject with invalid response from the orderer'); diff --git a/release_notes/v1.1.0-rc1.txt b/release_notes/v1.1.0.txt similarity index 91% rename from release_notes/v1.1.0-rc1.txt rename to release_notes/v1.1.0.txt index 81fc2e93fa..763b976b01 100644 --- a/release_notes/v1.1.0-rc1.txt +++ b/release_notes/v1.1.0.txt @@ -4,14 +4,6 @@ v1.1.0 Febuary 22, 2018 Release Notes ------------- -FAB-8470 -Users that have been using the 'grpc-max-send-message-length' configuration setting -may wish to use 'grpc.max_send_message_length' to avoid confusion with the actual -grpc settings. -Users that have been using the 'grpc-max-receive-message-length' configuration setting -may wish to use 'grpc.max_receive_message_length' to avoid confusion with the actual -grpc settings. - FAB-5398 Users trying to install globally the fabric-client or fabric-ca-client packages may have issues. There are issues with a few dependent packages stopping the @@ -20,6 +12,24 @@ able to be installed locally without issue. The only known solution to install globally is to add the --unsafe-perm option. sudo npm install -g fabric-client --unsafe-perm +FAB-8470 +Users that have been using the 'grpc-max-send-message-length' configuration setting +may wish to use 'grpc.max_send_message_length' to avoid confusion with the actual +grpc settings. +Users that have been using the 'grpc-max-receive-message-length' configuration setting +may wish to use 'grpc.max_receive_message_length' to avoid confusion with the actual +grpc settings. + +FAB-8592 +Responses from submitting transactions to the orderer will now include an info field +to indicate any issues the orderer may have had with the submission along with the +the status field returned previously. All status states will now be returned in +the promise.resolve(response) rather than a error object in the promise.reject(error) +returned previously for states other than 'SUCCESS'. This allows the application +to evaluate the status and info of responses from the orderer and determine for +itself the results of the submission. Network and connection errors will continue +to be returned in the promise.reject(error) to indicate issues where the orderer +was unable to respond. Known Vulnerabilities --------------------- diff --git a/test/integration/create-configtx-channel.js b/test/integration/create-configtx-channel.js index a8c8363f5e..ce820bdfec 100644 --- a/test/integration/create-configtx-channel.js +++ b/test/integration/create-configtx-channel.js @@ -166,16 +166,14 @@ test('\n\n***** Configtx Built config create flow *****\n\n', function(t) { }) .then((result) => { logger.debug(' response ::%j',result); - t.fail('Failed to get error. response: ' + result.status); + if(result && result.status && result.status.toString().indexOf('BAD_REQUEST') >= 0) { + t.pass('Successfully received the error message due to the conflict of channel: ' + result.info); + } else { + t.fail('Failed to get error. response: ' + result.status); + } t.end(); }, (err) => { - if(err.toString().indexOf('BAD_REQUEST') >= 0) { - t.pass('Successfully received the error message due to the conflict of channel: ' + err); - t.end(); - } - else { - t.fail('Got unexpected error: ' + err.stack ? err.stack : err); - t.end(); - } + t.fail('Got unexpected error: ' + err.stack ? err.stack : err); + t.end(); }); });