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
Latest versions won't accept custom event hubs errors #293
Comments
@pierreca can you explain why you think the error was introduced there? To me it seems far more likely that an error frame is being received, however it has an unknown |
@pierreca ah sorry I found the culprit, you're talking about this: https://github.com/noodlefrenzy/node-amqp10/blob/master/lib/types/amqp_error.js#L7. Yeah that totally looks like a bug if MS is using custom errors, I had read the spec to indicate that they only wanted to support the listed error conditions. Again it would be very helpful if you could provide a sample custom error, we can get this pushed in today |
@pierreca for your local testing, it might be enough to replace the |
Here's what I believe is the sample error trace for the unit test:
And a full trace:
|
Some custom event hubs AMQP errors (such as
com.microsoft:argument-out-of-range
when trying to connect to a non-existing partition) get swallowed. This is a breaking change, and as far as I can tell there's no way for the client to know what happened, the connection is just killed with an EncodingError that masks the real cause.This is due to the changes in
connection.js
in this commit: 5455179Also, it seems there's an issue with the way
error.js
is required intypes/amqp_error.js
, which leads to thethrow
on line 8 to throw aTypeError: errors.EncodingError is not a constructor
instead of an actualEncodingError
(at least, this happens with node 6.Easiest fix for this is to use
module.exports.
wherevererrors.
is used inerrors.js
and get rid of the localerrors
variable alltogether.. not elegant but it works...Unfortunately this is blocking the Event Hubs SDK from upgrading to the latest version of the library :-/
The text was updated successfully, but these errors were encountered: