Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use error on sender/receiver when reporting error on link closing #55

Merged
merged 4 commits into from
Jul 29, 2020

Conversation

ramya-rao-a
Copy link
Collaborator

@ramya-rao-a ramya-rao-a commented Jul 7, 2020

Description

If the error event is fired on closing a link, we currently only report context.session.error as the error.
But, it can so happen that the error is actual on the sender/receiver based on the link type and there is no session error. We found this in Azure/azure-sdk-for-js#9615

This PR makes changes to surface errors on the sender/receiver and then falling back on the session instead of always surfacing the error on the session.

Reference to any github issues

  • None

@ramya-rao-a
Copy link
Collaborator Author

cc @chradek because he is investigating the upstream issue

cc @grs to confirm that the error event fired when closing a sender or receiver link is accompanied by the actual error in the context.sender or context.receiver

lib/link.ts Outdated Show resolved Hide resolved
@ramya-rao-a
Copy link
Collaborator Author

Tests added to sender.spec.ts and receiver.spec.ts files would fail before the fix in this PR.
Tests added to session.spec.ts is just for completion sake.

@ramya-rao-a ramya-rao-a requested a review from chradek July 29, 2020 20:44
Copy link
Collaborator

@chradek chradek left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@ramya-rao-a ramya-rao-a merged commit 51d65df into amqp:master Jul 29, 2020
@ramya-rao-a ramya-rao-a deleted the link-close branch July 29, 2020 23:17
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.

3 participants