Skip to content

Commit

Permalink
Merge pull request #27 from swilliams-a3digital/master
Browse files Browse the repository at this point in the history
Fix issue where undefined is throw as connection error
  • Loading branch information
ramya-rao-a authored Apr 10, 2019
2 parents a014d24 + bffa113 commit e89e190
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/connection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ export class Connection extends Entity {

onClose = (context: RheaEventContext) => {
removeListeners();
const err = context.error || context.connection.error;
const err = context.error || context.connection.error || Error('Failed to connect');
log.error("[%s] Error occurred while establishing amqp connection: %O",
this.id, err);
return reject(err);
Expand Down

0 comments on commit e89e190

Please sign in to comment.