Closed awolden closed 8 years ago
Thanks for the heads-up, and sorry for the impact. That field was always supposed to be private. The .cause() method (or, better, the new VError.cause() function) is the expected way to get at that.
I'm not planning to change this, since restify-errors was depending on a private field. I'd still like to hear if it's breaking other packages, though.
@awolden restify-errors only uses the internal fields for unit tests (which are indeed currently broken). However, the code itself should not be accessing these fields directly. If you're seeing a problem with restify-errors, please file an issue in our repo. Thanks!
@donutespresso Thanks for the response! The issue wasn't with restify-errors
per-se, our tests were broken cause we were using the same internal properties that probably broke your tests. Based on Dave's comment above we changed our code to use .cause()
and it's working great.
We love restify-errors, so if we see an issue we will definitely provide feedback!
A build error was introduced to one of our projects and I tracked it down to this library (via restify-errors). When receiving an error object back, we were expecting there to be a property called
we_cause
, but it seems that has been mapped tojse_cause
in the most recent release .This is an easily fixed issue on our end, but I wanted to raise awareness about this potentially breaking change.
Thanks!