Closed Metallion closed 1 year ago
I've noticed since upgrading to Redlock 2 I'm getting this error a heap (curious why I didn't get it on Redlock 1, I wonder if it was previously failing silently). Would definitely be more helpful to have the underlying messages available in error tracking.
Thanks @Metallion https://github.com/leandromoreira/redlock-rb/releases/tag/2.0.6 🚀
I found the
"Too many Redis errors prevented lock acquisition"
to be a little unhelpful. If we'd see this in an error tracking system, we'd still have to guess what the errors were.The error object does come with an array containing all the original errors but I thought it'd make things a lot easier if we'd also include them in the error message. Otherwise I'd end up having to rescue the
LockAcquisitionError
on every call just to inspect and report the original errors.With this change we can just call the
lock
method as is and error tracking systems will get a helpful message telling us exactly what happened.