Skip to content

[Event Hubs][@azure/event-hubs_2.1.0] Added event handler error and protocolError on the connection object.#4318

Merged
ShivangiReja merged 3 commits intoAzure:event-hubs_2.1.1from
ShivangiReja:AddHanlders
Jul 15, 2019
Merged

[Event Hubs][@azure/event-hubs_2.1.0] Added event handler error and protocolError on the connection object.#4318
ShivangiReja merged 3 commits intoAzure:event-hubs_2.1.1from
ShivangiReja:AddHanlders

Conversation

@ShivangiReja
Copy link
Member

@ShivangiReja ShivangiReja commented Jul 15, 2019

  • Added event handlers error and protocolError on the connection object in connectionContext.ts that will just log the error and take care of the unhandled exception
  • Updated new version of Event Hubs
  • Updated changelog

… `protocolError` on the connection object.
};

const protocolError: OnAmqpEvent = async (context: EventContext) => {
const connectionError = context.connection && context.connection.error ? context.connection.error : undefined;
Copy link
Contributor

@ramya-rao-a ramya-rao-a Jul 15, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

undefined is the natural state of things. So this can be simplified to const connectionError = context.connection && context.connection.error;

On second thoughts, I would skip the need for the constants connectionError and contextError and use the context object directly

ShivangiReja and others added 2 commits July 15, 2019 15:09
@ramya-rao-a
Copy link
Contributor

@chradek fyi

@ShivangiReja ShivangiReja merged commit cb7f3cd into Azure:event-hubs_2.1.1 Jul 15, 2019
@chradek
Copy link
Contributor

chradek commented Jul 15, 2019

This is in lieu of updating an older version of amqp-common right? Want to make sure this isn't needed in the preview version of event hubs!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants